0xHaM-dDaily NFT Comparison copy
    Updated 2024-10-22
    -- forked from hess / Daily NFT Comparison @ https://flipsidecrypto.xyz/hess/q/3Ok5Ok1-vC56/daily-nft-comparison

    with chains as (select date(block_timestamp) as day,
    'Arbitrum' as chain,
    count(DISTINCT tx_hash) as sales ,
    count(DISTINCT BUYER_ADDRESS) as buyers,
    sales/buyers as avg_per_user
    from arbitrum.nft.ez_nft_sales
    where block_timestamp >= current_date - 31
    and block_timestamp::date < current_date
    group by 1,2
    UNION
    select date(block_timestamp) as day,
    'Base' as chain,
    count(DISTINCT tx_hash) as sales ,
    count(DISTINCT BUYER_ADDRESS) as buyers,
    sales/buyers as avg_per_user
    from base.nft.ez_nft_sales
    where block_timestamp >= current_date - 31
    and block_timestamp::date < current_date
    group by 1,2
    UNION
    select date(block_timestamp) as day,
    'Avalanche' as chain,
    count(DISTINCT tx_hash) as sales ,
    count(DISTINCT BUYER_ADDRESS) as buyers,
    sales/buyers as avg_per_user
    from avalanche.nft.ez_nft_sales
    where block_timestamp >= current_date - 31
    and block_timestamp::date < current_date
    group by 1,2
    UNION
    -- select date(block_timestamp) as day,
    -- 'Polygon' as chain,
    -- count(DISTINCT tx_hash) as sales ,
    -- count(DISTINCT BUYER_ADDRESS) as buyers,
    QueryRunArchived: QueryRun has been archived