maybeyonassushi_top_growth
Updated 2021-12-15
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 this_month as (
select
date(block_timestamp) as date,
pool_name,
sum(amount_usd) as usd_vol
from ethereum.dex_swaps
where platform = 'sushiswap'
and amount_usd is not null
and amount_usd < pow(10,9)
and block_timestamp > current_date - interval '30 days'
group by 1,2
),
growth as (
select
date,
pool_name,
usd_vol-lag(usd_vol) over (partition by pool_name order by date) as change
from this_month
order by change desc
),
pool_growth as (
select
pool_name,
sum(change) as net_growth
from growth
where change is not null
group by 1
)
select * from pool_growth
order by net_growth desc
limit 10
-- select * from ethereum.dex_swaps
-- where pool_name = 'USDT-DVF SLP'
-- order by amount_usd desc
Run a query to Download Data