where
clause are substituted with appropriate values for your environment.
select extract(hour from history_datetime) as Hour, avg(cpu_usage_percent) as CPU, avg(memory_usage_percent) as Memory from v3_0_host_hourly_history_view where history_datetime >= '2011-07-01' and history_datetime < '2011-07-31' group by extract(hour from history_datetime) order by extract(hour from history_datetime)
Hour | CPU | Memory |
---|---|---|
0 | 39 | 40 |
1 | 38 | 38 |
2 | 37 | 32 |
3 | 35 | 45 |
4 | 35 | 37 |
5 | 36 | 37 |