mz0111near 4
Updated 2023-06-26
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 TAB1 AS
(select
count(distinct tx_signer) as users,
project_name as pro
from near.core.fact_transactions
LEFT JOIN near.core.dim_address_labels
on address = TX_RECEIVER
where block_timestamp >= current_date - 7
and LABEL_TYPE = '{{label_types}}'
group by 2
having users > 35
),
TAB2 AS
(select
date_trunc('month',block_timestamp) as date,
tx_signer,
tx_receiver,
tx_hash as hash,
project_name
from near.core.fact_transactions
LEFT JOIN near.core.dim_address_labels
on address = TX_RECEIVER
where block_timestamp >= '{{Begining_Time}}'
and project_name in (select pro from tab1)
and LABEL_TYPE = '{{label_types}}'
)
select
date,
project_name,
count(distinct hash) as txs,
count(distinct tx_signer) as users
from TAB2
where project_name is not null
group by 1 , 2
Run a query to Download Data