NavidUntitled Query
Updated 2022-10-23Copy Reference Fork
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 mints as (
select
date(block_timestamp) as day,
count(distinct tx_id) as number_of_transactions
-- tx_id as tx_hash
-- event_data:id as nft_id
from
flow.core.fact_events
where
event_contract like '%RaceDay_NFT%' and
event_type like 'Minted'
group by
day
), sells as (
select
date(block_timestamp) as day,
count(distinct tx_id) as number_of_transactions
from
flow.core.ez_nft_sales
where
NFT_COLLECTION like '%RaceDay%'
group by
day
)
select
m.day,
m.number_of_transactions as "Mint Sales",
sum("Mint Sales") over (order by m.day asc) as "Total Mints Sales",
avg("Mint Sales") over (order by m.day asc rows between 7 preceding and current row) as "Average Mint Sales",
s.number_of_transactions as "Secondary Sales",
sum("Secondary Sales") over (order by s.day asc) as "Total Secondary Sales",
avg("Secondary Sales") over (order by s.day asc rows between 7 preceding and current row) as "Average Secondary Sales"
from
mints m join sells s on m.day=s.day
order by
m.day asc
Run a query to Download Data