Forum Moderators: open

Message Too Old, No Replies

MySql count()

MySql count()

         

hawksbill

5:36 pm on Aug 9, 2007 (gmt 0)

10+ Year Member



I have a MySql table with boolean columns "a" and "b".

I want to know how many rows have both a and b set to 1.

Is there any way to do this using MySql's count() or some other built in function? I'd like to avoid a 'where' clause because in the same query I also want to return count(a) and count(b).