RE: Get counts of col=value with an GROUP BY clause?

2004-01-05 Thread Mike Johnson
From: Greg Owen [mailto:[EMAIL PROTECTED] > I'm trying to build a query to show counts of specific > columns by value. > There's probably a simple way to do this that I don't know > about, and if you could just point me to the function or part > of the manual to research before you start lau

Re: Get counts of col=value with an GROUP BY clause?

2004-01-05 Thread Tobias Asplund
On Mon, 5 Jan 2004, Greg Owen wrote: > I tried (you can laugh here) to do it this way, but failed miserably: > > mysql> select class,count(questnum),count(difficulty='0'), >count(difficulty='1'),count(difficulty='2'), >count(in_use='0'),count(in_use='1') from Questions >group by class;

Get counts of col=value with an GROUP BY clause?

2004-01-05 Thread Greg Owen
I'm trying to build a query to show counts of specific columns by value. There's probably a simple way to do this that I don't know about, and if you could just point me to the function or part of the manual to research before you start laughing, I'd greatly appreciate it. Given the following