MilesFinchUntitled Query
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
›
⌄
with addr as (SELECT address,project_name
from crosschain.address_labels
where blockchAIN = 'solana' and label_type = 'nft')
SELECT progname,date(block_timestamp) as day, avg(amt)/pow(10,9) as avg_price,
sum(amt)/pow(10,9) as total_sales, sum(total_sales) over(partition by progname order by day) as cumulative_sales, avg(avg_price) over (partition by progname order by day) as cumulative_avg_price,
count(*) as total_txs
from
(SELECT *, instruction:programId as pId,
case when pid = 'CJsLwbP1iu5DuUikHEJnLfANgKy6stB2uFgvBBHoyxwz' then 'Solana NFT MarketPlace'
when pid = '617jbWo616ggkDxvW1Le8pV38XLbVSyWY8ae6QUmGBAU' then 'SolSeaNFT MarketPlace'
when pid = 'MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8' then 'MagicEdenV1'
when pid = 'M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K' then 'MagicEdenV2'
end as progname,
inner_instruction:instructions[0]:parsed:info:lamports+
inner_instruction:instructions[1]:parsed:info:lamports+
inner_instruction:instructions[2]:parsed:info:lamports+
inner_instruction:instructions[3]:parsed:info:lamports as amt
from solana.nfts
where mint in (SELECT address from addr )
and array_size(inner_instruction:instructions) > 4
-- and instruction:programId = 'MEisE1HzehtrDpAAT8PnLHjpSSkRYakotTuJRPjTpo8'
)
where progname is not NULL
GROUP by 1,2
order by 2 desc
Run a query to Download Data