HosseinUntitled Query
Updated 2022-11-06
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
list1 as (
select distinct(proposer) as proposer from flow.core.fact_transactions a
join flow.core.fact_events b
on a.tx_id = b.tx_id
and a.tx_succeeded = 1
where event_contract = 'A.39e42c67cc851cfb.EmeraldIdentityDapper'
),
list2 as (
select event_type, proposer, count(distinct(tx.tx_id)) as tx_num
from flow.core.fact_events events
join flow.core.fact_transactions tx
on events.tx_id = tx.tx_id
where exists (
select proposer
from flow.core.fact_transactions a
where tx.proposer = a.proposer
group by proposer
)
and proposer in (select proposer from list1)
group by event_type, proposer
)
select event_type,
sum(tx_num) as tx_num,
avg(tx_num) as avg_tx_num
from list2
group by 1
order by 2 desc
Run a query to Download Data