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
Try to enumerate the different fields changing that * (the star) > 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 by a.teaching_date DESC 2007/11/8, mysqlm