anniecryptoRVE 2
Updated 2022-12-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
--- SQL credit to Ali3N
select date_trunc ('month',block_timestamp) as month, label as name_of_DEX,
count (distinct tx_hash) as number_of_swaps,
count (distinct origin_from_address) as number_of_swappers,
sum (amount_usd) as Total_USD_amount,
Total_USD_amount/number_of_swaps as avg_USD_per_swap,
number_of_swaps/number_of_swappers as avg_swaps_per_swapper
from ethereum.core.ez_token_transfers
join (select * from ethereum.core.dim_labels where label_type = 'dex') as dextable
on ethereum.core.ez_token_transfers.origin_to_address = dextable.address
where tx_hash in (select tx_hash from (select distinct tx_hash from ethereum.core.fact_event_logs where event_name = 'Swap'))
and amount_usd > 0 and amount_usd < 1e10
and symbol not in ('VOLT','SMOL','DEA','DEUS','CENT','SEREN','SHR','ShibDoge','XTK','DSD','SHINTAMA','KORE','YFFC','DST','KPER','Para','ARTEON','$JOY','AsunaInu','ABC','YUAN','ARTEON','DAIQ','ZAI','EPRO','YKZ','BabyShinja','ETHM','CLEV','Akihiko','CUM','LUCK','CYFM','BORING','UNL')
group by 1,2
Run a query to Download Data