adambalaDOODLES123
    Updated 2023-05-11
    with a as

    (SELECT
    sum(PRICE) as volume ,avg (PRICE) as prices ,BLOCK_TIMESTAMP::date as date
    FROM ethereum.core.ez_nft_sales
    WHERE EVENT_TYPE = 'sale' and CURRENCY_SYMBOL = 'ETH' and LOWER(NFT_ADDRESS)=lower('0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e')
    group by date)

    select
    avg(prices) over(
    order by date
    rows between 199 preceding and current row ) moving_avg200,
    avg(prices) over(
    order by date
    rows between 49 preceding and current row ) moving_avg50,
    avg(prices) over(
    order by date
    rows between 19 preceding and current row ) moving_avg20,
    prices,
    date,volume
    from a
    Run a query to Download Data