NCAnalyticsDecentraland
Updated 2023-06-21Copy 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
›
⌄
SELECT date_trunc('month', BLOCK_TIMESTAMP) as date,
count(DISTINCT TX_HASH) as tx_count,
count(DISTINCT TOKENID) as unique_lands,
count(DISTINCT SELLER_ADDRESS) as seller, count(DISTINCT BUYER_ADDRESS) as BUYER,
sum(PRICE_USD) as volume_usd, avg(PRICE_USD) as avg_PRICE_uSD, median(PRICE_USD) as median_PRICE_uSD, max(PRICE_USD) as max_PRICE_uSD, min(PRICE_USD) as min_PRICE_uSD,
sum(TOTAL_FEES) as total_fees,
seller/buyer as ratio,
sum(tx_count) over (order by date asc rows between unbounded preceding and current row) as cum_tx,
sum(volume_usd) over (order by date asc rows between unbounded preceding and current row) as cum_volume,
tx_count/buyer as tx_buyer,
tx_count/seller as tx_seller
FROM ethereum.core.ez_nft_sales
WHERE
block_timestamp >= current_timestamp() - interval '{{since}}'
and nft_address =lower('0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d')
group by 1
Run a query to Download Data