Eman-RazStatistical Data Related to the Daily Sales of NFTs
Updated 2023-06-08
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 data_ as (with table1 as (with tab1 as (select date_trunc('day',block_timestamp) as day,
tx_hash, nft_address, project_name, nft_from_address, nft_to_address,
tokenid
from ethereum.core.ez_nft_transfers),
tab2 as (select date_trunc('day',block_timestamp) as day, tx_hash, from_address, tx_fee, eth_value
from ethereum.core.fact_transactions
where to_address='0x74312363e45dcaba76c59ec49a7aa8a65a67eed3' --X2Y2: Exchange
and eth_value<>0)
select tab1.day as date, tab1.tx_hash as tx_id, nft_address, project_name, nft_from_address as nft_seller,
from_address as nft_purchaser,
tokenid, tx_fee, eth_value
from tab1 left join tab2 on tab1.tx_hash=tab2.tx_hash and tab1.nft_to_address=tab2.from_address
order by 1)
select date, sum(eth_value) as volume, -count(distinct nft_seller) as seller,
count(distinct nft_purchaser) as purchaser, count(distinct tx_id) as sales_count, sum(tx_fee) as tx_fee_vol
from table1
where eth_value is not null
group by 1
order by 1)
select avg(volume) as "Average Sales Volume per Day", median(volume) as "Median Sales Volume", max(volume) as "Maximum Sales Volume in a Day",
min(volume) as "Minimum Sales Volume in a Day",
round(avg(purchaser)) as "Average Purchasers count per Day", round(median(purchaser)) as "Median Purchasers Count",
max(purchaser) as "Maximum Purchasers Count in a Day", min(purchaser) as "Minimum Purchasers Count in a Day",
round(avg(sales_count)) as "Average Sales Count per Day", round(median(sales_count)) as "Median Sales Count",
max(sales_count) as "Maximum Sales Count in a Day", min(sales_count) as "Minimum Sales Count in a Day",
avg(tx_fee_vol) as "Average Fee Collected per Day" , median(tx_fee_vol) as "Median Fee Collected",
max(tx_fee_vol) as "Maximum Fee Collected in a Day", min(tx_fee_vol) as "Minimum Fee Collected in a Day"
from data_
Run a query to Download Data