saeide-ahmadi-7Copy of Copy of Copy of Untitled Query
Updated 2022-12-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
31
32
33
34
35
36
›
⌄
with flow_prices as (
select
date(timestamp) as day,
avg(price_usd) as priceusd
from
flow.core.fact_prices
where
token='Flow'
group by
1
), flow_mints as (
select
date(block_timestamp) as day,
tx_id,
split_part(event_contract, '.', 3) as collection_name
from
flow.core.fact_events
where
event_type='MomentNFTMinted' and
tx_succeeded and
event_contract in (
'A.87ca73a41bb50ad5.Golazos',
'A.0b2a3299cc857e29.TopShot',
'A.e4cf4bdc1751c65d.AllDay'
)
), flow_sales as (
select
date(block_timestamp) as day,
tx_id,
split_part(nft_collection, '.', 3) as collection_name,
nft_id,
buyer,
case when currency = 'A.1654653399040a61.FlowToken' then price*priceusd else price end as volume
from
flow.core.ez_nft_sales s join flow_prices p on date(block_timestamp)=p.day
where
Run a query to Download Data