nsa2000new users
Updated 2023-01-17Copy Reference Fork
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 newUser as (
select
min(block_timestamp) as min_date,
'GMX' as platform,
origin_from_address
from arbitrum.core.fact_token_transfers
where origin_to_address in ('0x3d6ba331e3d9702c5e8a8d254e5d8a285f223aba','0xb87a436b93ffe9d75c5cfa7bacfff96430b09868')
and from_address != '0x0000000000000000000000000000000000000000'
group by 2,3
UNION
select
min(block_timestamp) as min_date,
'GNS' as platform,
origin_from_address
from polygon.core.fact_token_transfers
where origin_to_address in ('0xd8d177efc926a18ee455da6f5f6a6cfcee5f8f58','0x65187fec6ecc4774c1f632c7503466d5b4353db1','0xf8a140db8b05bec52c7e86d0d40d72f8e54fe559')
and contract_address = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063' -- DAI
and from_address != '0x0000000000000000000000000000000000000000'
group by 2,3
)
-- , lstTb as (
select
date_trunc('{{Interval}}', min_date)::date as date,
platform,
count(distinct origin_from_address) as new_Users_Cnt,
sum(new_Users_Cnt) over (partition by platform order by date) as cum_new_Users_Cnt
from newUser
group by 1,2
Run a query to Download Data