I have the following MySql table with ~19000 entries like this:
ID USER FIELD1 FIELD2 SOMEINT ERROR
1 name1 null null null missing...
2 name1 value1 value2 3 validated!
3 name1 value3 wrongvalue1 null syntax
4 name2 wrongvalue2 value4 null syntax
etc...................................................................
I would like to get a list like this:
USER totalEntries totalValid totalMissing totalSyntax
name1 3 1 1 1
name2 1 0 0 1
etc...................................................................
I have a query for every column like this:
select user, count(user) valid from table where
someint is not null group by user limit 0, 20000;
(total valid entries)
select user, count(*) totalEntries from table group by user
limit 0, 20000; (total entries)
select user, count(*) totalMissing from table where field1 is null or
field2 is null group by user limit 0, 20000; (total Missing entrie)
select user, count(*) syntax from table where error like 'syntax%'
group by user limit 0, 20000 (syntaxerror entries)
The problem is that "group by" does not list the count(...) entries as
USER valid
...
name3 0
So the 4 query results do not have the same rowcount. How can I solve this Problem?
count(responsible)? There is no 'responsible' in any of the data you showed before.