Re: Group By and IF statement

2007-11-08 Thread Enrique Sanchez Vela
--- mysqlman <[EMAIL PROTECTED]> wrote: > > I am attempting to get a simple query working: > > select *,MAX(a.teaching_date) as max, > MIN(a.teaching_date) as min from > teaching a, topic_cat b where a.teaching_topic = > b.topic_id or > a.teaching_topic = 999 group by a.teaching_topic > order b

Re: Group By and IF statement

2007-11-08 Thread yaya sirima
rder by a.teaching_date > DESC > > This all works, except I don't want to 'group by a.teaching_topic' if > a.teaching_topic = 999. > > Anyone know how to do this? Thank you. > -- > View this message in context: > http://www.nabble.com/Group-By-and-IF-st

Group By and IF statement

2007-11-07 Thread mysqlman
want to 'group by a.teaching_topic' if a.teaching_topic = 999. Anyone know how to do this? Thank you. -- View this message in context: http://www.nabble.com/Group-By-and-IF-statement-tf4768518.html#a13639835 Sent from the MySQL - General mailing list archive at Nabble.com. --