messariNEAR Social Users
Updated 2023-07-26
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
-- forked from Eman-Raz / Number of Users @ https://flipsidecrypto.xyz/Eman-Raz/q/7iQ1XlgS0tpw/number-of-users
with table1 as (select date_trunc('{{Time_Frame}}', block_timestamp) as "Date", count(distinct signer_id) as "Total User"
from near.social.fact_decoded_actions
group by 1
order by 1),
table2 as (with tab1 as (select signer_id as user, min(block_timestamp::date) as first_tx
from near.social.fact_decoded_actions
group by 1
order by 1)
select date_trunc('{{Time_Frame}}',first_tx) as "Date", count(distinct user) as "New User"
from tab1
group by 1
order by 1)
select table1."Date" as "Date", "Total User", "New User", "Total User"-"New User" as "Active User"
from table1 left join table2 on table1."Date"=table2."Date"
order by 1
Run a query to Download Data