Query editor
WITH getBridgeTransactions AS (SELECT amount * price as amount_usd FROM (SELECT * FROM query_2986481) x JOIN query_2815250 ON date_trunc('hour',evt_block_time) = date),setGroupings as (selectcasewhen amount_usd = 0 then nullwhen amount_usd <= 10 then '0 - $10'when amount_usd <= 100 then '$10 - $100'when amount_usd <= 500 then '$100 - $500'when amount_usd <= 1000 then '$500 - $1000'when amount_usd <= 5000 then '$1000 - $5000'when amount_usd <= 10000 then '$5000 - $10000'when amount_usd <= 50000 then '$10000 - $50000'when amount_usd <= 100000 then '$50000 - $100000'else '> $100000'end as amount_usd,casewhen amount_usd = 0 then 0when amount_usd <= 10 then 1when amount_usd <= 100 then 2when amount_usd <= 500 then 3when amount_usd <= 1000 then 4when amount_usd <= 5000 then 5when amount_usd <= 10000 then 6when amount_usd <= 50000 then 7when amount_usd <= 100000 then 8else 9end as orderingfrom getBridgeTransactions)select'Volume' as label,ordering,amount_usd,count(*) as transaction_countfromsetGroupingsgroup by1,2,3order by2 ASC