RamaharPolygon NFT
    Updated 2022-07-16
    With labels as (select
    address,
    address_name,
    project_name
    from polygon.core.dim_labels
    where project_name like '%opensea%' or project_name like '%nft%'
    ),

    nft as (select
    block_timestamp,
    tx_hash,
    origin_from_address as from_users,
    origin_to_address as to_users,
    raw_amount,
    raw_amount / POW(10,18) AS adjusted_amount,
    contract_address,
    project_name
    from polygon.core.fact_token_transfers
    join labels ON labels.address = polygon.core.fact_token_transfers.contract_address)

    select
    DATE(block_timestamp) as dayz,
    project_name,
    count(distinct from_users) as interact_users,
    count(distinct tx_hash) as txs,
    sum(adjusted_amount) as tokenvolume,
    sum(interact_users) over (partition by project_name order by dayz asc rows between unbounded preceding and current row) as users_cumulative,
    sum(txs) over (partition by project_name order by dayz asc rows between unbounded preceding and current row) as txs_cumulative
    from nft
    group by 1, 2
    Run a query to Download Data