HosseinUntitled Query
    Updated 2023-01-11
    select
    recorded_hour::date as day,
    iff(year(day) = 2022, 'Before Christmas', 'After Christmas') as timespan,
    avg(close) as price_usd,
    avg (price_usd) over (order by day rows between 6 preceding and current row) as moving_average_1_week
    from solana.core.fact_token_prices_hourly
    where symbol = 'MNGO'
    and day between date('2023-01-01') - interval '2 weeks' and date('2023-01-01') + interval '2 weeks'
    group by day, timespan
    order by day
    Run a query to Download Data