SocioCryptoNumber of sales
Updated 2023-08-26Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
SELECT date_trunc('day',block_timestamp) as date,
count(DISTINCT tx_hash) as n_sales,
COUNT(DISTINCT decoded_log:from) as n_seller,
COUNT(decoded_log:to) as n_purchaser,
sum(avax_value) as amnt
-- count(event_inputs:tokenId) as n_NFTs,
-- contract_address as nft_address
FROM avalanche.core.ez_decoded_event_logs a
LEFT JOIN avalanche.core.fact_transactions b using(tx_hash)
WHERE decoded_log:tokenId IS NOT NULL
AND date <= CURRENT_DATE-1
AND avax_value>0
AND tx_status = 'SUCCESS'
AND event_name = 'Transfer'
AND decoded_log:to !='0x0000000000000000000000000000000000000000'
AND decoded_log:from != '0x0000000000000000000000000000000000000000'
GROUP BY date
ORDER BY date DESC
Run a query to Download Data