0-MIDCopy of top 10 asset
Updated 2022-10-20
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
›
⌄
with task1 as (
with act1 as (
with tab1 as (
select date_trunc('week',BLOCK_TIMESTAMP)as week,TX_FROM as active_user
, count(distinct BLOCK_TIMESTAMP::date)as date
from osmosis.core.fact_transactions
group by 1,2
having date>=5),
tab2 as (
select TX_FROM,TX_ID
from osmosis.core.fact_transactions)
select active_user, TX_ID
from tab1
left join tab2
on tab1.active_user=tab2.TX_FROM),
act2 as (
select TRADER,TX_ID
from osmosis.core.fact_swaps)
select TRADER,count(distinct act2.TX_ID) as swap_tx
from act1
left join act2
on act1.TX_ID=act2.TX_ID
group by 1)
select swap_tx,count(distinct TRADER)as TRADER_count
from task1
group by 1
Run a query to Download Data