SalehCelsius and Sushi-swaps-sushi-uniswap-Total
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
›
⌄
with lst_check as (
select
address
from flipside_prod_db.crosschain.address_labels
where project_name ='celsius network'
group by 1
)
,lst_uni2 as (
select
pool_name
,count (distinct tx_hash) as tx_count
,sum(AMOUNT_IN_USD) as sum_amount_usd
from ethereum.core.ez_dex_swaps
where origin_from_address in (select address from lst_check)
group by 1
having SUM_AMOUNT_USD>0
order by 1
)
,lst_uni3 as (
select
pool_name
,count (distinct TX_ID) as tx_count
,sum(abs(AMOUNT0_USD)) as sum_amount_usd
from flipside_prod_db.uniswapv3.swaps
where RECIPIENT in (select address from lst_check)
group by 1
having SUM_AMOUNT_USD>0
order by 1
)
select * from lst_uni2
union all
select * from lst_uni3
Run a query to Download Data