LittlerDataTx_fee Margin error
    Updated 2025-03-18
    with price_table as (

    select
    hour::date as date
    ,avg(price) as avg_price
    from ronin.price.ez_prices_hourly
    where token_address is null
    and is_native = 'TRUE'
    group by 1
    ),

    nft_transfers as (
    select
    tx_hash
    ,count(distinct contract_address) as diffs_nfts
    ,iff(diffs_nfts > 1, 'more than 1', 'just one') as type
    from ronin.nft.ez_nft_transfers
    where block_timestamp > '2025-01-01'
    group by tx_hash

    ),

    joining as (
    select
    txs.tx_hash
    ,txs.block_timestamp::date as date
    ,txs.tx_fee
    ,nft_transfers.type
    from ronin.core.fact_transactions as txs
    join nft_transfers using (tx_hash)
    where block_timestamp > '2025-01-01'
    ),

    pricing as (
    select
    tx_hash