SocioAnalyticaOverview
Updated 2024-09-25
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 traders as (
select
date_trunc('week', block_timestamp) as date,
count(DISTINCT trader) as n_traders
from
(
select
block_timestamp,
seller_address as trader
from avalanche.nft.ez_nft_sales
union all
select
block_timestamp,
buyer_address as trader
from avalanche.nft.ez_nft_sales
)
group by 1
)
,
base as (
select
date_trunc('week', block_timestamp) as date,
count(DISTINCT tx_hash) as n_sales_,
sum(price_usd) as volume_,
count(DISTINCT buyer_address) / count(DISTINCT seller_address) as buyer_per_seller_ratio,
sum(platform_fee_usd) as platform_fee,
sum(CREATOR_FEE_USD) as creator_fee,
sum(total_fees_usd) as total_fee
from avalanche.nft.ez_nft_sales
group by 1
)
select
a.date,
coalesce(a.n_sales_,0) as n_sales,
QueryRunArchived: QueryRun has been archived