HosseinUntitled Query copy
Updated 2023-02-02Copy 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
›
⌄
with main as (
select
block_timestamp,
tx_hash,
platform_name,
price_usd,
total_fees_usd,
gas_price,
gas_used
from ethereum.core.ez_nft_sales
join ethereum.core.fact_transactions
using(tx_hash)
where event_type = 'sale'
)
select
platform_name,
count(distinct tx_hash) as sales_count,
sum(price_usd) as total_sales_volume_usd,
avg(price_usd) as average_sales_volume_usd,
median(price_usd) as median_sales_volume_usd
from main
where block_timestamp >= '2022-01-01'
group by platform_name
order by total_sales_volume_usd desc
Run a query to Download Data