yasmin-n-d-r-hDaily NFT Trades on arbi
    Updated 2022-08-31
    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 arbitrum.core.fact_event_logs lg inner join arbitrum.core.fact_transactions tr using(tx_hash)
    where
    event_inputs:tokenId is not null
    and event_inputs:from != '0x0000000000000000000000000000000000000000'
    and eth_value>0
    and event_inputs:to !='0x0000000000000000000000000000000000000000'
    and tr.block_timestamp > current_date - 90
    and tx_status = 'SUCCESS'
    and event_name = 'Transfer'
    and tr.block_timestamp::date < CURRENT_DATE
    )

    select
    distinct block_timestamp::date as DAY
    , count(distinct tx_hash) over (partition by Day) as daily_sales

    from nft_sales_transactions
    order by day
    Run a query to Download Data