afonsoWeekly Mint Numbers per each Marketplace since 2022
    Updated 2022-12-21
    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
    date_trunc('week', block_timestamp)::date as week,
    platform_name,
    count (distinct tx_hash) as mints_count,
    sum (price_usd) as total_price_usd,
    avg (price_usd) as average_price_usd,
    sum (gas_used) as total_gas_used,
    avg (gas_used) as avg_gas_used,
    median (gas_used) as median_gas_used,
    sum (mints_count) over (partition by platform_name order by week) as comulative_mints_count,
    sum (total_price_usd) over (partition by platform_name order by week) as comulative_price_usd,
    sum (total_gas_used) over (partition by platform_name order by week) as comulative_gas_used
    from main
    where week >= '2022-01-01'
    group by week, platform_name
    having total_price_usd > 0
    order by week asc
    Run a query to Download Data