RE: Newbie Q: How do I get a COUNT of a computed field?

2004-03-09 Thread Austin Hastings
> From: Victoria Reznichenko [mailto:[EMAIL PROTECTED] > What error message did you receive? Your query worked fine for me: When I say: SELECT IF(t2.status IN(2,3,4), "open", "closed") t2st, COUNT(t2st) FROM tasks t2 GROUP BY t2st; I get: #1054 - Unknown column 't2st' in 'field list

RE: Newbie Q: How do I get a COUNT of a computed field?

2004-03-09 Thread Austin Hastings
d") t2st > FROM tasks t2 > GROUP BY 1 > > Then you'll probably want > SELECT IF(t2.status IN(2,3,4), "open", "closed"), count(*) t2st > FROM tasks t2 > GROUP BY t2st > > Andy > -Original Message- > From: Austin Hasting

Newbie Q: How do I get a COUNT of a computed field?

2004-03-09 Thread Austin Hastings
I'm not sure if this is a bug or a user failure, so I'm going to ask here before doing anything rash. I'm trying to classify a single field using the IN() expression into two groups: IF(t2.status IN(2,3,4), "open", "closed") I'd like to GROUP those together so I can COUNT them. When I try