adambalaUntitled Query
    Updated 2022-11-24
    with a as

    (SELECT
    avg ( CLOSE) as prices ,date_trunc('DAY', RECORDED_HOUR) as date
    FROM solana.core.fact_token_prices_hourly
    WHERE SYMBOL = 'SOL'
    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
    from a
    Run a query to Download Data