MasiNFTs II
    Updated 2024-11-15
    with tb0 as ( select DISTINCT tx_hash,
    platform_name as market,
    block_timestamp::date as date,
    token_id,
    buyer_address as buyer,
    nft_address as collection,
    price as nft_price
    from near.nft.ez_nft_sales
    where block_timestamp::date >= '2024-09-01')
    ,
    tb3_1 as (select DISTINCT tx_hash,
    from near.core.fact_actions_events_function_call
    where method_name = 'ft_on_transfer'
    and receiver_id = 'uwon.hot.tg'
    and block_timestamp::date >= '2024-09-01'
    )
    ,
    tb3_2 as ( select block_timestamp,
    a.tx_hash,
    'uwon' as market,
    contract_address as collection,
    from_address as seller,
    to_address as buyer,
    token_id
    from near.nft.fact_nft_transfers a join tb3_1 b on a.tx_hash = b.tx_hash
    where block_timestamp::date >= '2024-09-01'
    and to_address != 'uwon.hot.tg'
    and from_address != 'uwon.hot.tg')
    ,
    tb3_3 as ( select hour,
    symbol,
    avg(price) as price
    from crosschain.price.ez_prices_hourly
    where symbol = 'UWON'
    group by 1,2)
    ,
    QueryRunArchived: QueryRun has been archived