I am trying to generate simple report which gives me Failed test count daily for whole month. Is there a way to write a sql query that does that? Rather then running queries by changing dates? This is what i am doing:
select count (*) from students where Message Like 'Failed Test.%'
and Timestamp > '01-01-2013' and Timestamp < '01-02-2013'
So above query gives me count 5. Then i change the date from 01-01 to 01-02 and get next days count and so on. But this seems like very time consuming thing. Just checking if there is a better way to do that.
This gives counts grouped by day for a month’s date range:
You can obviously widen the date range…
[Hopefully the ‘timestamp’ column is not really a timestamp…]