Afonso_Diazby season
    Updated 2024-11-29
    with

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

    main as (
    select
    tx_id,
    block_timestamp,
    buyer as buyer_address,
    currency as token_address,
    price,
    nft_id
    from
    flow.nft.ez_nft_sales
    where
    nft_collection = 'A.0b2a3299cc857e29.TopShot'

    union all

    select
    tx_id,
    block_timestamp,
    event_data:offerAddress as buyer_address,
    event_data:paymentVaultType as token_address,
    event_data:offerAmount as price,
    event_data:nftId as nft_id
    from
    QueryRunArchived: QueryRun has been archived