Moechain 3
Updated 2024-05-29
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 t1 as (
SELECT
TIMESTAMP,
CONTRACT as user
from external.tokenflow_starknet.decoded_transactions
),
t3 as (
select
user as user1,
min(date_trunc('month',TIMESTAMP)) as first_txn
from (
select * from t1
)
group by user1
),
t4 as (
select month, user
from (
select date_trunc('month',TIMESTAMP) as month, user from t1
)
group by month, user
)
select
month,
user_type,
count(distinct user) as no_users
from (
select month, first_txn, user1, user,
case
when datediff('month',first_txn,month)=0 then 'New user'
QueryRunArchived: QueryRun has been archived