saeedmznNFL All Day - allday vs topshot
    Updated 2022-07-01
    with NFallDay as (
    select EVENT_CONTRACT, CONTRACT_NAME
    from flow.core.dim_contract_labels
    where contract_name ='AllDay'
    group by 1,2
    ),
    TopsShot as (
    select EVENT_CONTRACT, CONTRACT_NAME
    from flow.core.dim_contract_labels
    where contract_name ='TopShot'
    group by 1,2
    ),
    ALLday as (
    select
    BLOCK_TIMESTAMP::date as date ,
    count (DISTINCT BUYER) as num_buyers,
    count (DISTINCT SELLER ) as num_sellers ,
    count (DISTINCT TX_ID) as num_sales ,
    sum (num_sales) over (order by date ) as cum_sales ,
    sum (PRICE) as volume,
    sum (volume) over (order by date) as cum_volume
    from flow.core.fact_nft_sales
    where NFT_COLLECTION in (select EVENT_CONTRACT from NFallDay )
    and tx_succeeded =true
    group by 1
    ),
    Topshot as (
    select BLOCK_TIMESTAMP::date as date ,
    count (DISTINCT BUYER) as num_buyers,
    count (DISTINCT SELLER ) as num_sellers ,
    count (DISTINCT TX_ID) as num_sales ,
    sum (num_sales) over (order by date ) as cum_sales ,
    sum (PRICE) as volume,
    sum (volume) over (order by date) as cum_volume
    from flow.core.fact_nft_sales
    where NFT_COLLECTION in (select EVENT_CONTRACT from TopsShot )
    Run a query to Download Data