Query editor
selectdate_trunc('hour', block_time) as "timestamp",'robinhood' as origin_key,count(*) FILTER (WHERE gas_used > 0) as txcount,count(*) as txcount_plain,count(*) as txcount_comparison,SUM(gas_used - gas_used_for_l1) / (60 * 60) AS gas_per_second,--COUNT(distinct "from") AS daa,SUM((gas_used / POWER(10,18) * cast(effective_gas_price as DOUBLE)) + coalesce (l1_fee / POWER(10,18),0)) AS fees_paid_eth,approx_percentile((gas_used / POWER(10,18) * cast(effective_gas_price as DOUBLE)) + coalesce(l1_fee / POWER(10,18),0), 0.5) FILTER (WHERE gas_price > 0) as txcosts_median_eth,count(distinct "from") as daafrom robinhood.transactionswhere block_date >= date_trunc('day', now() - interval '{{hours}}' hour) -- for better partitioningand block_time < date_trunc('hour', now())and block_time >= date_trunc('hour', now() - interval '{{hours}}' hour)group by 1