Updated 2022-09-09
    with nft_sales_transactions as (
    select
    block_timestamp
    , tx_hash
    , event_inputs:from as seller
    , origin_from_address as purchaser
    , event_inputs:tokenId as token_id
    , contract_address as nft_address
    , case
    when contract_address = '0x7Dec38e3874ECbc842Cc61E66C1386aca0C0EA1F' then 'pradaxadidas'
    else contract_address
    end as collection
    from polygon.core.fact_event_logs lg inner join polygon.core.fact_transactions tr using(tx_hash)
    where
    event_inputs:tokenId is not null
    and event_inputs:from != '0x0000000000000000000000000000000000000000'
    and MATIC_Value>0
    and event_inputs:to !='0x0000000000000000000000000000000000000000'
    and tr.block_timestamp >= '2022-07-01'
    and tx_status = 'SUCCESS'
    and event_name = 'Transfer'
    and tr.block_timestamp::date < CURRENT_DATE
    ) , NFT_Collections as (
    select
    distinct nft_address
    ,collection
    from nft_sales_transactions
    )
    , Mint_Txs as (
    select
    block_timestamp
    ,MATIC_Value
    ,tx_fee
    ,tx_hash
    ,to_address
    Run a query to Download Data