Sandeshsol_nft
Updated 2022-11-29
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
›
⌄
with sol_price as
(
select date_trunc({{granularity}},recorded_hour) as time,avg(close) as usd from solana.core.fact_token_prices_hourly
where symbol='SOL'
group by time
),
sol_nft as
(
select
'solana' as chain,
date_trunc('{{granularity}}',block_timestamp) as time,
nft.tx_id as tx_hash,
nft.marketplace as marketplace,
seller,
purchaser as buyer,
nft.mint,
ad.address_name as project_name,
'0' as token_id,
'sol' as currency,
nft.sales_amount*sol.usd as price
from solana.core.fact_nft_sales nft
inner join sol_price sol
on date_trunc('{{granularity}}',block_timestamp) =sol.time
left join solana.core.dim_labels ad
on nft.mint=ad.address
where time between '{{start_date}}' and '{{end_date}}'
)
select * from sol_nft
where tx_hash='4HGGULRTpqwwHjTyKf2KvyVkoDjF8AkTKKmt5vKVEJ9rkJjAgasMeubKCgUNsTYg2egQ3TNcSJStvXdbH3DAA9ku'
-- limit 5
Run a query to Download Data