Moe2 HadeSwap
Updated 2023-08-30Copy 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with prices as (
select
hour::date as date,
avg(price) as price from ethereum.core.fact_hourly_token_prices
where token_address ilike '0xD31a59c85aE9D8edEFeC411D448f90841571b89c'
group by 1)
,base as (
select a.*,
ADDRESS_NAME as collection,
sales_amount*price as sale_volume_usd
from solana.core.fact_nft_sales a
join prices b on a.block_timestamp::date = b.date
join solana.core.dim_labels l on a.mint = l.address
where succeeded = 'TRUE'
and sales_amount > 0
and marketplace = 'hadeswap')
select
count(distinct PURCHASER) as PURCHASERs ,
count(distinct SELLER) as SELLERs ,
count(distinct TX_ID) as TX_IDs ,
sum(sale_volume_usd) as sale_usd ,
sale_usd/SELLERs as usd_per_seller,
sale_usd/PURCHASERs as usd_per_PURCHASER,
sale_usd/TX_IDs as usd_per_tx,
avg(sale_volume_usd) as avg_sale_volume_usd,
median(sale_volume_usd) as median_sale_volume_usd
from base
Run a query to Download Data