SocioCryptosales over time
Updated 2022-07-26
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
SELECT date_trunc('day',a.block_timestamp) as date,
a.marketplace,
b.play_type,
sum(a.price) as amnt,
sum(CASE WHEN a.currency = 'A.ead892083b3e2c6c.DapperUtilityCoin' THEN a.price ELSE a.price*c.price_usd end) as amnt_usd,
count(DISTINCT tx_id) as n_sales
FROM flow.core.fact_nft_sales a
LEFT JOIN flow.core.dim_topshot_metadata b
ON a.nft_id = b.nft_id
LEFT JOIN flow.core.fact_prices c
ON lower(a.currency) = lower(c.token_contract) and date_trunc('day',a.block_timestamp) = date_trunc('day',c.timestamp)
WHERE a.nft_collection = 'A.0b2a3299cc857e29.TopShot'
AND a.tx_succeeded
GROUP BY date,marketplace,play_type
Run a query to Download Data