select history_datetime as DateTime, cpu_usage_percent as CPU, memory_usage_percent as Memory
from v3_0_host_configuration_view, v3_0_host_samples_history_view
where v3_0_host_configuration_view.host_id = v3_0_host_samples_history_view.host_id
and host_name = 'example.labname.abc.company.com'
and v3_0_host_configuration_view.history_id in (select max(a.history_id)
from v3_0_host_configuration_view as a
where v3_0_host_configuration_view.host_id = a.host_id)
and history_datetime >= '2011-07-01 18:45'
and history_datetime <= '2011-07-31 21:45'