0-MIDmonthly top 10
Updated 2023-05-09
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
›
⌄
with task1 as (
with act1 as (
with tab1 as (
select date_trunc('month',DATE)as month,CURRENCY, ADDRESS
from osmosis.core.fact_daily_balances
where currency not like'%pool%'
group by 1,2,3),
tab2 as (
select ADDRESS,PROJECT_NAME
from osmosis.core.dim_labels)
select month,PROJECT_NAME,count(distinct tab1.ADDRESS)as wallets
from tab1
left join tab2
on tab1.CURRENCY=tab2.ADDRESS
where PROJECT_NAME is not null
group by 1,2)
select month,PROJECT_NAME,wallets,rank()over(partition by Month order by wallets desc) as rank
from act1)
select month,PROJECT_NAME,wallets
from task1
where rank<=10
Run a query to Download Data