HosseinUntitled Query
Updated 2022-10-22Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
›
⌄
with mints as (
select *
from flow.core.fact_events
where event_type = 'Minted'
and event_contract = 'A.329feb3ab062d289.RaceDay_NFT'
and tx_succeeded = 1
)
select
count(distinct(a.event_data:to)) as minters_num,
count(distinct(a.event_data:id)) as mints_num
from flow.core.fact_events a
where exists (
select * from flow.core.fact_events b
where b.event_type = 'Minted'
and b.event_contract = a.event_contract
and b.tx_succeeded = 1
and a.event_data:id = b.event_data:id
)
where a.event_type = 'Deposit'
and a.tx_succeeded = 1
Run a query to Download Data