sakineh5021-nIQRzBUntitled Query
Updated 2022-04-11
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 token as (
SELECT DISTINCT S.token0
from ethereum.dex_liquidity_pools S
where platform = 'sushiswap'
)
,
launch as (
SELECT T.token0 , min(creation_time::date) as launched_date_on_sushiswap
from ethereum.dex_liquidity_pools S , token T
where platform = 'sushiswap'
and T.token0 = S.token0
and creation_time is not NULL
group by 1
order by 2 desc
)
,
coin as (
SELECT launched_date_on_sushiswap , C.name as symbol, C.address as contract_address
from launch L , ethereum.contracts C
where L.token0 = C.address
order by 1 desc
)
,
sel as (
SELECT symbol, sum(AMOUNT_USD) as swap, count(tx_id)
from coin C , ethereum.dex_Swaps
where TOKEN_ADDRESS = contract_address
and platform = 'sushiswap'
and block_timestamp::date >='2022-01-01'
group by 1
)
SELECT launched_date_on_sushiswap , E.symbol, C.contract_address
from sel S , coin C
left outer join ethereum.erc20_balances E on E.contract_address = C.contract_address
Run a query to Download Data