SELECT
trunc(recorded_hour,'day') as date,
avg(close) as price,
avg(((CLOSE - OPEN) / OPEN)) * 100 AS price_change_percentage
FROM flow.price.fact_hourly_prices
WHERE id ILIKE '%game%'
--and close is not null and open is not NULL
group by 1
order by 1 asc