HosseinUntitled Query
Updated 2022-10-23
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
›
⌄
WITH tab1 as (
SELECT
tx_id as tx_hash,
event_data:id as nft_id
FROM flow.core.fact_events
WHERE event_contract LIKE 'A.329feb3ab062d289.RaceDay_NFT'
AND event_type LIKE 'Minted'
)
SELECT
date_trunc('day', block_timestamp) as day,
count(DISTINCT nft_id) as mints,
count(DISTINCT event_data:to) as minters
FROM flow.core.fact_events
LEFT outer JOIN tab1
ON nft_id = event_data:id
AND tx_hash = tx_id
WHERE event_type LIKE 'Deposit'
AND NOT tx_hash is NULL
AND event_contract LIKE 'A.329feb3ab062d289.RaceDay_NFT'
GROUP BY 1
Run a query to Download Data