Query editor
WITH getAllBridgeVolume as (SELECT ABS(amount_usd) as amount_usdFROM query_2273494WHERE amount_usd > 0),setGroupings as (selectcasewhen amount_usd <= 10 then ' < $10'when amount_usd <= 100 then '$10 - $100'when amount_usd <= 1000 then '$100 - $1K'when amount_usd <= 10000 then '$1K - 10K'when amount_usd <= 100000 then '$10K - $100K'when amount_usd <= 500000 then '$100K - $500K'ELSE 'More than $500K'end as amount,casewhen amount_usd <= 10 then 1when amount_usd <= 100 then 2when amount_usd <= 1000 then 3when amount_usd <= 10000 then 4when amount_usd <= 100000 then 5when amount_usd <= 500000 then 6else 7end as order_no,*fromgetAllBridgeVolume)SELECT 'Amount' as label,order_no,amount,COUNT(*) as amount_countFROM setGroupingsGROUP BY 1,2,3ORDER BY 2