SalehUntitled Query
Updated 2022-07-13
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
35
36
›
⌄
with uniswap2 as (
select
date_trunc(week, block_timestamp)::date as date
,pool_name
,count (distinct tx_hash) as tx_count
,sum(amount_in_usd) as sum_usd
from ethereum.core.ez_dex_swaps
------------------------------------------------------------------------------
where origin_from_address in (
select address
from flipside_prod_db.crosschain.address_labels
where project_name ='celsius network'
group by address
)
-------------------------------------------------------------------------------
group by date ,pool_name
order by date
)
, uniswap3 as (
select
date_trunc(week, block_timestamp)::date as date
,pool_name
,count (distinct TX_ID) as tx_count
,abs(sum(AMOUNT1_USD))as sum_usd
from flipside_prod_db.uniswapv3.swaps
------------------------------------------------------------------------------
where RECIPIENT in (
select address
from flipside_prod_db.crosschain.address_labels
where project_name ='celsius network'
group by address
)
-------------------------------------------------------------------------------
group by date ,pool_name
order by date
)
Run a query to Download Data