<blush> ouch </blush> To Jimmy and Chris and the list in general. This list is particualiarly kind to question of this nature. I for one appricate it. In this case it is amazing how many wrong things I came up with.
On Tue, 13 Jan 2004, Chris Elsworth wrote: > On Tue, Jan 13, 2004 at 02:03:26AM -0500, [EMAIL PROTECTED] wrote: > > > > select prodid,count(groupid) as cnt from products > > where (groupid=65 or groupid=66) > > group by imgsml having cnt>1; > > > > I.e. replacing order by with a having clause. After trying many variations; are > > 'order by' and 'having' mutually exclusive? If so - how would you order the > > result table? > > They shouldn't be, you just need to get the order right: > > select prodid,count(groupid) as cnt from products > where (groupid=65 or groupid=66) > group by imgsml having cnt>1 order by cnt; > > Is perfectly valid syntax. > > -- > Chris > _____ Douglas Denault [EMAIL PROTECTED] Voice: 301-469-8766 Fax: 301-469-0601 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]