elsina2024-08-15: top collection_name breakdown by sales volume
    Updated 2024-10-05
    SELECT
    case when name = 'HOT Collection' then 'DoubleDog' else name end as name,
    COUNT(DISTINCT tx_hash) AS transaction_count,
    COUNT(DISTINCT buyer_address) AS unique_trader_count,
    SUM(price_usd) AS transaction_volume,
    -- sum(platform_fee_usd) as protocol_fee,
    transaction_count / unique_trader_count AS average_transactions_per_user,
    transaction_volume / unique_trader_count AS average_volume_per_user,
    transaction_volume / transaction_count AS average_volume_per_transaction
    -- protocol_fee / transaction_count AS average_protocl_fee
    FROM
    near.nft.ez_nft_sales t1 join near.nft.dim_nft_contract_metadata t2 on t1.nft_address = t2.contract_address
    WHERE
    price_usd is not null and
    platform_name = 'Mitte' and
    block_timestamp::date between '2024-09-01' and '2024-09-30'
    group by name
    order by 2 desc
    -- limit 1
    QueryRunArchived: QueryRun has been archived