elsina2024-09-14: total activity per user
    Updated 2024-11-01
    with users as (
    SELECT
    date_trunc('day', block_timestamp) as date,
    buyer_address,
    count(DISTINCT tx_hash) as tx_count,
    count(DISTINCT project_name) as collection_count,
    sum(price_usd) as total_vol,
    sum(TOTAL_FEES_USD) as total_total_fee,
    sum(PLATFORM_FEE_USD) as total_platform_fee,
    sum(CREATOR_FEE_USD) as total_creator_fee,
    sum(TX_FEE_USD) as total_tx_fee,
    avg(price_usd) as avg_nft_price,
    FROM
    base.nft.ez_nft_sales
    WHERE
    block_timestamp::date between '2024-10-01' and '2024-10-31'
    GROUP BY
    date, buyer_address
    )

    select
    'Per User' as state,
    avg(tx_count) as avg_tx_count_per_user,
    avg(total_vol) as avg_tot_vol_per_user,
    avg(collection_count) as avg_collections_per_user,
    avg(total_total_fee) as avg_total_fee_per_user,
    avg(total_platform_fee) as avg_platform_fee_per_user,
    avg(total_creator_fee) as avg_creator_fee_per_user,
    avg(total_tx_fee) as avg_tx_fee_per_user,
    from
    users
    QueryRunArchived: QueryRun has been archived