Query editor
withtimeline as (select date_trunc('day', time) as dayfrom unnest(sequence(timestamp '2024-10-29',cast(NOW() as timestamp),interval '1' day)) as s(time)), fluid_dex_swaps as (select *from "query_4227449"), other_dexes_volume as (selectday, blockchain, case when rnk > 5 then 'others' else dex end as dex, sum(volume_usd) as volume_usdfrom (select *, rank() over (partition by day, blockchain order by volume_usd desc) as rnkfrom (selectt.block_date as day, t.blockchain, t.project as dex, sum(t.amount_usd) as volume_usdfrom dex.trades as twhere t.block_date >= (select min(day) from timeline)and t.blockchain = 'ethereum'and project <> 'fluid' -- no label on Dune yetgroup by 1, 2, 3 ))group by 1, 2, 3), dex_volume_with_fluid_ethereum as (select day, blockchain, dex, volume_usdfrom other_dexes_volumeunionselect date_trunc('day', hour) as day, blockchain, 'fluid' as dex, sum(amount_in_usd) as volume_usdfrom fluid_dex_swapswhere blockchain = 'ethereum'group by 1, 2, 3)select *from dex_volume_with_fluid_ethereumorder by day desc, volume_usd asc