yasmin-n-d-r-hmerry4nft
    Updated 2023-01-14
    with nft_sales_transactions as (
    select
    block_timestamp,
    tx_hash,
    event_inputs :
    from
    as seller,
    event_inputs : to as purchaser,
    event_inputs : tokenId as token_id,
    contract_address as nft_address
    from
    avalanche.core.fact_event_logs lg
    inner join avalanche.core.fact_transactions tr using(tx_hash)
    where
    event_inputs : tokenId is not null
    and event_inputs :
    from
    != '0x0000000000000000000000000000000000000000'
    and avax_value > 0
    and event_inputs : to != '0x0000000000000000000000000000000000000000'
    and tx_status = 'SUCCESS'
    and event_name = 'Transfer'
    and tr.block_timestamp :: date < CURRENT_DATE
    ),
    arb_nft_sales_transactions as (
    select
    block_timestamp,
    tx_hash,
    event_inputs :
    from
    as seller,
    event_inputs : to as purchaser,
    event_inputs : tokenId as token_id,
    contract_address as nft_address
    from
    arbitrum.core.fact_event_logs lg
    Run a query to Download Data