Updated 2022-09-03
    with a as (select
    BLOCK_TIMESTAMP,
    TX_HASH,
    ORIGIN_FROM_ADDRESS as buyer ,
    EVENT_INPUTS:from as seller ,
    EVENT_INPUTS:tokenId as token_id,
    case when ORIGIN_TO_ADDRESS='0xfb8664e4eb4d2f8b0220d358d0d9c4896dc84959' then 'NFTXStakingZap'
    when ORIGIN_TO_ADDRESS='0x66f26e38bd50fd52a50da8e87e435f04f98001b7' then 'Marketplace Zap'
    when ORIGIN_TO_ADDRESS='0x998ef16ea4111094eb5ee72fc2c6f4e6e8647666' then 'stratosnft'
    when ORIGIN_TO_ADDRESS='0x7bc8b1b5aba4df3be9f9a32dae501214dc0e4f3f' then 'tofuNFT: Market' else 'others'
    end as platform
    from
    arbitrum.core.fact_event_logs
    where CONTRACT_ADDRESS='0x642ffab2752df3bce97083709f36080fb1482c80'
    and EVENT_NAME ='Transfer' --limit 2
    and ORIGIN_TO_ADDRESS !='0x642ffab2752df3bce97083709f36080fb1482c80'
    -- and TX_STATUS=' SUCCESS'
    and BUYER !=SELLER
    order by 1 desc )

    select
    count(distinct TX_HASH) as txs ,
    count(distinct buyer) as buyers ,
    count(distinct seller) as sellers ,
    count(distinct token_id) as token_id ,
    token_id ,
    BLOCK_TIMESTAMP::date as date ,
    platform
    from a
    group by date,platform ,token_id
    Run a query to Download Data