I have a database with 2 fileds a date and a string (there are more fileds but only these to are interesting for this) the string can be empty. Now I want to count how many strings are empty and how many are not.
SELECT
`date`, `serial`, count(`serial`) as count
FROM
`updates`
WHERE
`date` BETWEEN '2012-11-25 00:00:00' AND '2012-11-25 23:59:59'
GROUP BY
`serial`
This is my code at the moment. I don’t really know how to aggregate this in a good way.
Greetings
Alex
// EDIT
As Result I want to have:
2012-11-25 NULL 2452
2012-11-25 NOT NULL 3476
If you want to count nulls strings, and not nulls, you could use this:
EDIT: