with cte as (
select
to_artifact_name,
event_source,
count(distinct project_name) as num_projects,
array_agg(distinct project_name) as projects,
sum(amount) as gas_fees
from `oso.rf4_events_daily_to_project`
where event_type = 'CONTRACT_INVOCATION_DAILY_L2_GAS_USED'
group by 1,2
order by 3 desc)
select
to_artifact_name,
event_source,
num_projects,
projects,
gas_fees / num_projects / 1e18 as gas_fees
from cte
where cte.num_projects > 1
order by gas_fees desc
What is it?
See here for query and snapshot result in Google Sheet