vendettaweekly added new users by each token
Updated 2023-02-23
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
›
⌄
-- forked from 77566836-65c2-4194-ba6d-dd97fa56c5c4
with new_users_first_currency as (
select first_user,first_project,first_date , row_num from (
select sender as first_user ,project_name as first_project , min(block_timestamp) as first_date
, ROW_NUMBER() OVER (PARTITION BY first_user ORDER BY first_date) as row_num
from osmosis.core.fact_transfers inner join osmosis.core.dim_labels
on currency=address
group by 1,2
UNION
select TRADER as first_user ,project_name as first_project , min(block_timestamp) as first_date
, ROW_NUMBER() OVER (PARTITION BY first_user ORDER BY first_date) as row_num
from osmosis.core.fact_swaps inner join osmosis.core.dim_labels
on from_CURRENCY=address
group by 1,2
UNION
select TRADER as first_user ,project_name as first_project , min(block_timestamp) as first_date
, ROW_NUMBER() OVER (PARTITION BY first_user ORDER BY first_date) as row_num
from osmosis.core.fact_swaps inner join osmosis.core.dim_labels
on to_CURRENCY=address
group by 1,2)
where row_num=1)
select count(*) , first_project , date_trunc('week', first_date) from new_users_first_currency
group by 2 , 3
Run a query to Download Data