olavType of Average USDC Swap volume
Updated 2022-10-27Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
select type, avg(volume_avg) as total_volume_avg, sum(tx_num) as total_tx_num from (
select
event_inputs:from as wallet_address,
avg(event_inputs:value / pow(10, 6)) as volume_avg,
count(distinct(tx_hash)) as tx_num,
case
when volume_avg <= 500 then '<= 100'
when volume_avg between 500 and 1000 then 'Between 500 and 1000'
when volume_avg between 1000 and 100000 then 'Between 1000 and 10,000'
when volume_avg between 10000 and 1000000 then 'Between 10,000 and 100,0000'
else '> 1M'
end as type
from ethereum.core.fact_event_logs
where 1 = 1
and event_name = 'Transfer'
and contract_address = '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
and tx_status = 'SUCCESS'
and block_timestamp::date >= '2022-09-01'
group by wallet_address
)
group by type
order by total_volume_avg desc
Run a query to Download Data