MLDZMNEthsale2
    Updated 2023-05-08
    -- forked from Ethsale @ https://flipsidecrypto.xyz/edit/queries/6d0b8589-ce46-4a52-8a25-2b66de440a82

    -- forked from ENI1 @ https://flipsidecrypto.xyz/edit/queries/aef9c2bf-dbe5-4e8e-98bb-7d10ac0c4e28

    select
    date_trunc('week',BLOCK_TIMESTAMP) as date,
    count(distinct tx_hash) as sale_no,
    count(distinct BUYER_ADDRESS) as buyer_no,
    count(distinct SELLER_ADDRESS) as seller_no,
    count(distinct TOKENID) as no_nfts,
    sum(PRICE) as volume,
    sum(price_usd) as volume_usd,
    sale_no/buyer_no as average_buyer,
    sum(buyer_no) over (order by date) as cum_buyers,
    sum(sale_no) over (order by date) as cum_sale,
    sum(volume_usd) over (order by date) as cum_volume
    from ethereum.core.ez_nft_sales
    where BLOCK_TIMESTAMP>=current_date-30
    group by 1



    Run a query to Download Data