MLDZMN872-5
Updated 2023-02-10
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with t1 as (select
distinct LIQUIDITY_PROVIDER_ADDRESS as withdrawers,
BLOCK_TIMESTAMP as time_with
from osmosis.core.fact_liquidity_provider_actions
where POOL_ID = [872] and action = 'pool_exited')
select
PROJECT_NAME,
count( distinct tx_id) as swaps ,
--sum(swaps)over(partition by act order by date rows between unbounded preceding and current row ) as cumulative_swaps,
count( distinct TRADER) as swapper ,
--sum(userss)over(partition by act order by date rows between unbounded preceding and current row ) as cumulative_userss
sum(FROM_AMOUNT/1e6) as swap_amount,
row_number() over (order by swap_amount desc) as rank1
from osmosis.core.fact_swaps s , osmosis.core.dim_tokens l
where TRADER in (select withdrawers from t1)
and address = to_currency and BLOCK_TIMESTAMP>='2023-01-18'
and FROM_CURRENCY in ('ibc/9F9B07EF9AD291167CF5700628145DE1DEB777C2CFC7907553B24446515F6D0E','ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858')
group by 1 order by 4 desc
limit 10
Run a query to Download Data