Madimint total
Updated 2022-11-30Copy Reference Fork
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 txs as (select tx_id, fee/pow(10,9) as fee
from solana.core.fact_transactions
where BLOCK_TIMESTAMP >= '2022-10-31' and succeeded = 'TRUE' and inner_instructions[1]:instructions[3]:accounts[12]= 'yootn8Kf22CQczC732psp7qEqxwPGSDQCFZHkzoXp25')
,
df as (
select
BLOCK_TIMESTAMP, solana.core.fact_nft_mints.TX_ID, 'y00ts' as Collection, MINT as NFT, fee
from solana.core.fact_nft_mints left join txs on solana.core.fact_nft_mints.tx_id = txs.tx_id
where solana.core.fact_nft_mints.tx_id in (select tx_id from txs) and BLOCK_TIMESTAMP >= '2022-10-31'
UNION ALL
select
BLOCK_TIMESTAMP, TX_HASH as tx_id, 'Art Gobblers' as Collection, TOKENID as NFT, TX_FEE as fee
from ethereum.core.ez_nft_mints
WHERE NFT_ADDRESS = lower('0x60bb1e2AA1c9ACAfB4d34F71585D7e959f387769'))
select * from (
select *, sum(nft_mint) over (order by Number_of_the_day asc rows between unbounded preceding and current row) as cum_nft,
sum(sum_fee) over (order by Number_of_the_day asc rows between unbounded preceding and current row) as cum_fee from(
select ROW_NUMBER() OVER(ORDER BY date_trunc('day',BLOCK_TIMESTAMP) asc) AS Number_of_the_day,
date_trunc('day',BLOCK_TIMESTAMP) as date, 'Art Gobblers' as Collection, count(DISTINCT nft) as nft_mint, sum(fee) as sum_fee
from df where collection = 'Art Gobblers'
group by 2,3
)
UNION ALL
select *, sum(nft_mint) over (order by Number_of_the_day asc rows between unbounded preceding and current row) as cum_nft,
sum(sum_fee) over (order by Number_of_the_day asc rows between unbounded preceding and current row) as cum_fee from(
select ROW_NUMBER() OVER(ORDER BY date_trunc('day',BLOCK_TIMESTAMP) asc) AS Number_of_the_day,
date_trunc('day',BLOCK_TIMESTAMP) as date, 'y00ts' as Collection, count(DISTINCT nft) as nft_mint, sum(fee) as sum_fee
from df where collection = 'y00ts'
group by 2,3))
where number_Of_the_day < 27
Run a query to Download Data