Tobi_1scornful-ivory
Updated 2024-09-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
SELECT
TO_DATE(HOUR) AS price_date, -- Group by day (convert hour timestamp to date)
AVG(PRICE) AS avg_price -- Calculate average price per day
FROM
flow.price.ez_prices_hourly
WHERE
SYMBOL = 'FLOW' -- Filter for the FLOW token
AND HOUR >= DATEADD(day, -30, CURRENT_DATE()) -- Last 30 days
GROUP BY
TO_DATE(HOUR) -- Group by date
ORDER BY
price_date ASC; -- Sort by date to show the trend
QueryRunArchived: QueryRun has been archived