Elprognerd17 - NFT Sales daily
Updated 2023-04-13Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with t1 as (SELECT
Block_timestamp,
TX_SIGNER,
tx_hash,
TRY_PARSE_JSON(REPLACE(tx:receipt[0]:outcome:logs[0], 'EVENT_JSON:')):data[0]:token_ids[0] AS NFT,
tx:actions[0]:FunctionCall:deposit / 1e24 AS Volume
from near.core.fact_transactions
where tx:actions[0]:FunctionCall:method_name = 'nft_buy')
SELECT
date_trunc('day', block_timestamp) as day,
COUNT(DISTINCT TX_SIGNER) as "Total Number of NFT Buyers",
COUNT(DISTINCT tx_hash) as "Total Number of NFT Sales",
COUNT(DISTINCT NFT) as "Total Number of Sold NFTs",
sum(Volume) as "Total Volume of Sold NFTs"
from t1
where block_timestamp BETWEEN '{{From}}' and DATEADD(DAY, 7, '{{From}}')
GROUP by 1
order by 1
Run a query to Download Data