Afonso_Diazgrouping sales
    Updated 2025-05-12
    with

    pricet as (
    select
    hour::date as dt,
    avg(price) as token_price_usd
    from
    aptos.price.ez_prices_hourly
    where
    symbol = 'APT'
    group by 1
    ),

    sales as (
    select
    tx_hash,
    block_timestamp,
    seller_address,
    buyer_address,
    project_name,
    nft_address,
    platform_name,
    nvl(total_price_usd, total_price * token_price_usd) as price_usd,
    nvl(platform_fee_usd, platform_fee * token_price_usd) as platform_fee_usd
    from
    aptos.nft.ez_nft_sales
    left join pricet on block_timestamp::date = dt
    )

    select
    case
    when price_usd < 10 then 'Less than $10'
    when price_usd <= 50 then '$10 - $50'
    when price_usd <= 100 then '$50 - $100'
    when price_usd <= 500 then '$100 - $500'
    when price_usd <= 1000 then '$500 - $1000'
    Last run: 16 days ago
    TYPE
    TRANSACTIONS
    1
    $10 - $50167746
    2
    $100 - $50044486
    3
    $1000 - $5000881
    4
    $50 - $10040577
    5
    $500 - $10003440
    6
    $5000 - $10,0008
    7
    Less than $101688487
    7
    157B
    3s