Salehf-w-32-optimism-Distribution
Updated 2022-11-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
select
case
when RAW_AMOUNT/pow(10,6)>0 and RAW_AMOUNT/pow(10,6)<10 then '0 To 10'
when RAW_AMOUNT/pow(10,6)>=10 and RAW_AMOUNT/pow(10,6)<100 then '10 To 100'
when RAW_AMOUNT/pow(10,6)>=100 and RAW_AMOUNT/pow(10,6)<500 then '100 To 500'
when RAW_AMOUNT/pow(10,6)>=500 and RAW_AMOUNT/pow(10,6)<1000 then '500 To 1000'
when RAW_AMOUNT/pow(10,6)>=1000 and RAW_AMOUNT/pow(10,6)<5000 then '1000 To 5000'
when RAW_AMOUNT/pow(10,6)>=5000 and RAW_AMOUNT/pow(10,6)<10000 then '5000 To 10000'
when RAW_AMOUNT/pow(10,6)>=10000 and RAW_AMOUNT/pow(10,6)<20000 then '10000 To 20000'
when RAW_AMOUNT/pow(10,6)>=20000 then 'Greater than 10,000'
end as Distribution
,count(DISTINCT tx_hash) as tx_count
,count(DISTINCT origin_from_address) as wallets
,sum(RAW_AMOUNT/pow(10,6)) as volume
,avg(RAW_AMOUNT/pow(10,6)) as avg_volume
from optimism.core.fact_token_transfers
where block_timestamp::date>=CURRENT_DATE-{{Days}}
and contract_address='0x7f5c764cbc14f9669b88837ca1490cca17c31607' --USDC
and Distribution is not null
group by 1
Run a query to Download Data