nitsNBA vs Others
    Updated 2022-07-04
    with nba as
    (SELECT date(block_timestamp) as day, sum(price) as total_sale_vol,
    sum( total_sale_vol) over (order by day) as cumulative_vol,
    COUNT(DISTINCT tx_id) as total_txs,
    sum(total_txs) over (order by day) as cumulative_txs , 'nba' as type
    from flow.core.fact_nft_sales
    where nft_collection = 'A.0b2a3299cc857e29.TopShot' and tx_succeeded
    GROUP by 1 ),
    others as
    (SELECT date(block_timestamp) as day, sum(price) as total_sale_vol,
    sum( total_sale_vol) over (order by day) as cumulative_vol,
    COUNT(DISTINCT tx_id) as total_txs,
    sum(total_txs) over (order by day) as cumulative_txs , 'others' as type
    from flow.core.fact_nft_sales
    where nft_collection != 'A.0b2a3299cc857e29.TopShot' and nft_collection != 'A.e4cf4bdc1751c65d.AllDay' and tx_succeeded
    GROUP by 1 ),
    all_day as
    (SELECT date(block_timestamp) as day, sum(price) as total_sale_vol,
    sum( total_sale_vol) over (order by day) as cumulative_vol,
    COUNT(DISTINCT tx_id) as total_txs,
    sum(total_txs) over (order by day) as cumulative_txs , 'all_day ' as type
    from flow.core.fact_nft_sales
    where nft_collection = 'A.e4cf4bdc1751c65d.AllDay' and tx_succeeded
    GROUP by 1 )
    SELECT * from all_day
    UNION ALL
    SELECT * FROM others
    UNION ALL
    SELECT * FROM nba
    -- limit 100
    Run a query to Download Data