ArioOptimism-WETH distribution swap Volume
Updated 2023-04-15
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
select
date_trunc(day, BLOCK_TIMESTAMP)::date as date,
case
when amount_out_usd < 10 then 'Tier 1: Less than 10$'
when amount_out_usd between 10 and 100 then 'Tier 2: $10-100'
when amount_out_usd between 100 and 500 then 'Tier 3: $100-500'
when amount_out_usd between 500 and 1000 then 'Tier 4: $500-1k'
when amount_out_usd between 1000 and 10000 then 'Tier 5: $1k-10k'
when amount_out_usd between 10000 and 100000 then 'Tier 6: $10k-100k'
when amount_out_usd > 100000 then 'Tier 7: More than $100k'
end as status,
sum(amount_out_usd) as "Swap Volume (USD)"
from optimism.core.ez_dex_swaps
where EVENT_NAME = 'Swap'
and SYMBOL_IN = 'WETH'
and SYMBOL_OUT = 'OP'
and amount_out_usd is not null
and BLOCK_TIMESTAMP >= Current_date - 60
and BLOCK_TIMESTAMP < Current_date
group by 1,2
Run a query to Download Data