0xHaM-dtotal
    Updated 2025-04-08
    with eventTb as (
    select
    block_timestamp,
    tx_hash,
    tr.from_address as seller_add,
    tr.to_address as buyer_add,
    tr.contract_address as contract_address,
    tr.name as collection,
    p.symbol,
    token_id,
    log.decoded_log:acceptedSettlePrice / 1e18 as nft_price,
    (log.decoded_log:acceptedSettlePrice / 1e18)*price as amount_usd,
    ((log.decoded_log:acceptedSettlePrice / 1e18)*price)/quantity as price_usd,
    log.decoded_log:settleToken as token_add
    from ronin.nft.ez_nft_transfers tr
    join ronin.core.ez_decoded_event_logs log using (tx_hash, block_timestamp)
    left join ronin.price.ez_prices_hourly p on date_trunc('hour', block_timestamp) = hour and log.decoded_log:settleToken = token_address
    where event_name = 'OrderMatched'
    and decoded_log:order[0]:extraData[0][2] = token_id
    and tx_succeeded
    )
    select
    count(distinct tx_hash) as n_sales,
    count(distinct buyer_add) as buyers,
    count(distinct seller_add) as sellers,
    count(distinct collection) n_collection,
    sum(price_usd) as sales_volume_usd,
    avg(price_usd) as avg_price_usd,
    median(price_usd) as median_price_usd,
    max(price_usd) as max_price_usd,
    min(price_usd) as floor_price_usd,
    from eventTb
    where year(block_timestamp::date) = '2025'


    Last run: 17 days ago
    N_SALES
    BUYERS
    SELLERS
    N_COLLECTION
    SALES_VOLUME_USD
    AVG_PRICE_USD
    MEDIAN_PRICE_USD
    MAX_PRICE_USD
    FLOOR_PRICE_USD
    1
    16506625865318429311454749.607601829.574534641.3494116586.019593752.35714e-20
    1
    89B
    17s