--- 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
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
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.
--