Echo5577PRICE PER DAY
Updated 2024-10-06
99
1
2
3
4
5
6
7
8
9
10
›
⌄
SELECT
DATE(HOUR) AS day, -- Extract the day from the timestamp
AVG(PRICE) AS avg_price_base -- Calculate the average price for each day
FROM base.price.ez_prices_hourly
WHERE
MONTH(HOUR) = 9 -- Filter for the month of September
AND YEAR(HOUR) = YEAR(CURRENT_DATE()) -- Ensure it's for the current year
GROUP BY DATE(HOUR) -- Group by each day
ORDER BY day ASC; -- Order by day in ascending order
QueryRunArchived: QueryRun has been archived