FatemeTheLadyPart1: P NFTs, Volume, transactions and users
    Updated 2022-07-15
    WITH NFT as
    (select tx_hash
    from polygon.core.fact_event_logs a join polygon.core.dim_labels b on a.contract_address=b.address
    where label_type='nft')

    SELECT
    block_timestamp::date as date,
    sum(matic_value) as sum_NFT_volume,
    count(distinct tx_hash) as num_NFT_txs,
    count(distinct from_address) as num_NFT_users,
    sum(num_NFT_txs) over (order by date) as Cumulative_num_txs,
    sum(sum_NFT_volume) over (order by date) as Cumulative_sum_NFT_volume
    from polygon.core.fact_transactions
    where tx_hash in (select tx_hash from NFT)
    and block_timestamp::date>= '2022-06-01' and block_timestamp::date<= '2022-06-30'
    and STATUS= 'SUCCESS'
    group by 1 order by 1 asc
    Run a query to Download Data