rackhaelBAYC Cummulative 2022
    Updated 2022-11-11
    SELECT date_trunc('day',block_timestamp) as date,
    count(distinct tx_hash) as daily_txns,
    sum(platform_fee) as fees_ETH,
    sum(platform_fee_usd) as fees_USD,
    sum(price) as price_ETH,
    sum(price_usd) as nft_price_USD,
    sum(creator_fee) as royalties_ETH,
    sum(creator_fee_usd) as royalties_USD,
    count(buyer_address) as daily_buyers,
    count(seller_address) as daily_sellers,

    sum(daily_txns) OVER (order by date asc rows between unbounded preceding and current row) AS Cummulative_daily_txns,
    sum(fees_ETH) OVER (order by date asc rows between unbounded preceding and current row) AS Cummulative_fees_ETH,
    sum(fees_USD) OVER (order by date asc rows between unbounded preceding and current row) AS Cummulative_platform_fee_USD,
    sum(price_ETH) OVER (order by date asc rows between unbounded preceding and current row) AS Cummulative_price_ETH,
    sum(nft_price_USD) OVER (order by date asc rows between unbounded preceding and current row) AS Cummulative_price_USD,
    sum(royalties_ETH) OVER (order by date asc rows between unbounded preceding and current row) AS Cummulative_royalties_ETH,
    sum(royalties_USD) OVER (order by date asc rows between unbounded preceding and current row) AS Cummulative_royalties_USD,
    count(daily_buyers) OVER (order by date asc rows between unbounded preceding and current row) AS cummulative_daily_buyers,
    count(daily_sellers) OVER (order by date asc rows between unbounded preceding and current row) AS Cummulative_daily_sellers
    FROM ethereum.core.ez_nft_sales
    WHERE date_trunc('day', block_timestamp) >= '2022-01-01'
    AND NFT_ADDRESS = '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d' --BAYC contract address
    AND currency_symbol like 'ETH'
    GROUP BY date
    ORDER BY date

    Run a query to Download Data