boomer77luna 52
    Updated 2022-02-27
    with raw as (select date_trunc('day', block_timestamp) as dt, max(block_timestamp) as close_dt, price_usd
    from terra.oracle_prices
    where symbol = 'LUNA'
    group by 1,3)

    select dt, close_dt, price_usd, case
    when price_usd < 52 then 'below 52'
    else 'above 52' end as cat, 1 as counts
    from raw
    where dt >= CURRENT_DATE - 90 and hour(close_dt) = 0
    Run a query to Download Data