bachiNFT comp1
    Updated 2022-09-17
    with flow_nfts as (
    select date(block_timestamp) as day,
    count(distinct nft_id) as no_of_sales,
    count(no_of_sales) over (order by day asc) as cumulative_total_sales,
    count(distinct buyer) as total_unique_buyers,
    count(total_unique_buyers) over (order by day asc) as cumulative_buyers_count,
    round(sum(price),2) as total_sales_volume,
    sum(total_sales_volume) over (order by day asc) as cumulative_sales_volume,
    count(distinct seller) as total_unique_sellers,
    count(total_unique_sellers) over (order by day asc) as cumulative_sellers_count,
    round(sum(price),2) as average_sales_volume,
    'Flow' as chain
    from flow.core.fact_nft_sales
    where block_timestamp >= dateadd(month, -6, getdate())
    group by day ),

    ethereum_nfts as (
    select date(block_timestamp) as day,
    count(distinct nft_address) as no_of_sales,
    count(no_of_sales) over (order by day asc) as cumulative_total_sales,
    count(distinct buyer_address) as total_unique_buyers,
    count(total_unique_buyers) over (order by day asc) as cumulative_buyers_count,
    round(sum(price),2) as total_sales_volume,
    sum(total_sales_volume) over (order by day asc) as cumulative_sales_volume,
    count(distinct seller_address) as total_unique_sellers,
    count(total_unique_sellers) over (order by day asc) as cumulative_sellers_count,
    round(sum(price),2) as average_sales_volume,
    'Ethereum' as chain
    from ethereum.core.ez_nft_sales
    where event_type = 'sale'
    and block_timestamp >= dateadd(month, -6, getdate())
    group by day
    ),

    solana_nfts as (
    select date(block_timestamp) as day,
    Run a query to Download Data