tarunb2023-04-07 10:01 AM
Updated 2023-04-07
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
SELECT
AVG(gas_price), --apply aggregate function to columns that are not being grouped
trunc(block_timestamp, 'day') as time --truncates each timestamp to its day
FROM
optimism.core.
WHERE
time > '2022-01-01' -- dates are in 'YYYY-MM-DD' format
AND
time != '2022-03-11' -- omit outlier seen (if desired)
GROUP BY
time
ORDER BY
time DESC;
Run a query to Download Data