I want to run a single query to generate a daily average response time in
seconds for a seven day period and have it return an array of 7 values (one
for each day of the week). Currently I have to run 7 queries and change the
between date values. Is it possible to do it in one query?

This query works, but only gives me the 24 hour period I ask for.
SELECT AVG(monitor_report.resp_sec) FROM monitor_report WHERE
monitor_report.toc_epoch between '2002-07-03' AND monitor_report.url_id =
21189

This query does not work, is it possible to do something like this?
SELECT AVG(monitor_report.resp_sec) FROM monitor_report WHERE
monitor_report.toc_epoch between '2002-07-03' AND '2002-07-04' AND
monitor_report.toc_epoch between '2002-07-02' AND '2002-07-03' AND
monitor_report.url_id = 21189

Thanks
zack


Reply via email to