HosseinUntitled Query copy
    Updated 2023-02-02
    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