kimmayyer-5963nbaplay-10
Updated 2022-07-25
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_price as (
select
timestamp::date as days,
avg(price_usd) as flow_price_usd
from flow.core.fact_prices
where token_contract = 'A.1654653399040a61.FlowToken'
and timestamp::date >= '2022-04-01'
group by days
),
top_shot_sales_dapper_coin as (
select
block_timestamp,
nft_id,
price,
buyer
from flow.core.fact_nft_sales
where nft_collection = 'A.0b2a3299cc857e29.TopShot'
and currency = 'A.ead892083b3e2c6c.DapperUtilityCoin'
and tx_succeeded = 'true'
),
top_shot_sales_flow_coin as (
select
s.block_timestamp as block_timestamp,
s.nft_id as nft_id,
s.price * p.flow_price_usd as price,
s.buyer
from flow.core.fact_nft_sales s
left join flow_price p on s.block_timestamp::date = p.days
where nft_collection = 'A.0b2a3299cc857e29.TopShot'
and currency = 'A.1654653399040a61.FlowToken'
and tx_succeeded = 'true'
),
final_result as (
select * from top_shot_sales_dapper_coin
union
select * from top_shot_sales_flow_coin
Run a query to Download Data