potmoOP Sale Data
    Updated 2022-10-16
    with base as (
    select
    price_category,
    count(*) as total
    from
    (
    select
    case
    when price <= 0.01 then 'trinket'
    when price > 0.01 and price <= 0.1 then 'souvenir'
    when price > 0.1 and price <= 1 then 'keepsake'
    when price > 1 then 'heirloom'
    else 'null'
    end as price_category
    from
    optimism.core.ez_nft_sales
    where
    1 = 1
    and event_type = 'sale'
    )
    group by 1
    order by 1 desc
    )

    select price_category, total,
    round(total / (select sum(total) from base) *100, 1) as percent
    from base

    Run a query to Download Data