ArioOptimism NFT Purchasing Behavior - part 1 - USD based
    Updated 2022-10-19
    with
    tab_1 as (
    select
    BLOCK_TIMESTAMP,
    tx_HASH,
    PLATFORM_NAME,
    SELLER_ADDRESS,
    NFT_ADDRESS,
    CURRENCY_SYMBOL,
    PRICE_USD
    from optimism.core.ez_nft_sales
    where 1=1
    and price_usd is not NULL
    and BLOCK_TIMESTAMP >= '2022-04-14'
    )
    select
    date_trunc('day', BLOCK_TIMESTAMP) as date,
    case
    when PRICE_USD < 10 then 'Tier 1. PRICE USD < 10'
    when PRICE_USD >= 10 and PRICE_USD < 100 then 'Tier 2. 10 =< PRICE USD < 100'
    when PRICE_USD >= 100 and PRICE_USD < 1000 then 'Tier 3. 100 =< PRICE USD < 1K'
    when PRICE_USD >= 1000 then 'Tier 4. 1K =< PRICE USD'
    end as tier,
    count(distinct tx_hash) as "# Transactions",
    sum(PRICE_USD) as "USD Volume",
    sum("# Transactions") over(partition by tier order by date) as "Total TXs By Tiers"
    from tab_1
    where BLOCK_TIMESTAMP >= '2022-04-14'
    group by 1,2
    order by 1 asc


    Run a query to Download Data