Afonso_Diazgrouping by label
Updated 2024-08-30
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
transactions as (
select
tx_id,
block_timestamp,
a.event_contract as contract_address,
c.authorizers[0] as user
from flow.core.fact_events a
join flow.core.fact_transactions c
using (tx_id, tx_succeeded)
where tx_succeeded = 1
and block_timestamp::date >= current_date - interval '1 month'
)
select
label_type,
count(distinct contract_address) as contracts,
count(distinct tx_id) as transactions,
count(distinct user) as users
from transactions
join flow.core.dim_labels
on address = contract_address
where block_timestamp::date between '{{ start_date }}' and '{{ end_date }}'
group by 1
order by transactions desc
limit 10
QueryRunArchived: QueryRun has been archived