Sbhn_NP2023-02-23 05:31 AM
Updated 2023-02-23
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
›
⌄
select
block_timestamp::date as date,
case when platform ilike '%Uniswap%' then 'Uniswap' else platform end as platform,
count(distinct tx_hash) as swaps,
count(distinct SENDER) as swappers,
count(distinct case when TOKEN_IN ilike '0x5283D291DBCF85356A21bA090E6db59121208b44' then tx_hash end ) as swap_in_count,
count(distinct case when TOKEN_out ilike '0x5283D291DBCF85356A21bA090E6db59121208b44' then tx_hash end ) as swap_out_count,
sum(case when TOKEN_IN ilike '0x5283D291DBCF85356A21bA090E6db59121208b44' then AMOUNT_IN end ) as swap_in_blur,
sum(case when TOKEN_OUT ilike '0x5283D291DBCF85356A21bA090E6db59121208b44' then AMOUNT_OUT end ) as swap_out_blur,
swap_in_blur - swap_out_blur as net
from
ethereum.core.ez_dex_swaps
where
(TOKEN_IN ilike '0x5283D291DBCF85356A21bA090E6db59121208b44'
or
TOKEN_OUT ilike '0x5283D291DBCF85356A21bA090E6db59121208b44')
group by 1 ,2
Run a query to Download Data