re_annIdentify Top Buyers by Total USD Spent
    Updated 2024-04-14
    WITH BuyerExpenditures AS (
    SELECT
    buyer_address,
    SUM(price_usd) AS total_spent_usd
    FROM
    base.nft.ez_nft_sales
    WHERE
    event_type = 'sale'
    GROUP BY
    buyer_address
    )
    SELECT
    buyer_address,
    total_spent_usd
    FROM
    BuyerExpenditures
    WHERE
    total_spent_usd > (SELECT AVG(total_spent_usd) * 1.5 FROM BuyerExpenditures)
    ORDER BY
    total_spent_usd DESC;

    QueryRunArchived: QueryRun has been archived