misaghlbAcross Protocol Airdrop
Updated 2022-12-05
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
›
⌄
with swap_data as (
select PLATFORM,
block_timestamp,
TX_HASH,
ORIGIN_FROM_ADDRESS as trader,
AMOUNT_IN_USD as vol
from ethereum.core.ez_dex_swaps
where TOKEN_OUT = '0x44108f0223a3c3028f5fe7aec7f9bb2e66bef82f'
UNION ALL
select PLATFORM,
block_timestamp,
TX_HASH,
ORIGIN_FROM_ADDRESS as trader,
AMOUNT_OUT_USD as vol
from ethereum.core.ez_dex_swaps
where TOKEN_IN = '0x44108f0223a3c3028f5fe7aec7f9bb2e66bef82f'
)
select
date_trunc('hour', block_timestamp) as date,
PLATFORM,
count(distinct TX_HASH) as swaps,
count(distinct trader) as wallets,
sum(vol) as usd_vol,
avg(vol) as avg_usd_vol,
sum(usd_vol) over (partition by PLATFORM order by date) as cumu_usd_vol,
sum(swaps) over (partition by PLATFORM order by date) as cumu_swaps
from swap_data
group by date, PLATFORM
Run a query to Download Data