select
date_trunc('day',hour) as Date,
avg (price) as Price,
case
when Date <= '2022-09-15' then 'Before Update'
when Date > '2022-09-15' then 'After Update' end as Updating
from ethereum.core.fact_hourly_token_prices
where symbol = 'WETH' and date >= '2022-09-05' and Updating is not NULL group by 1