Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpcc05!hpcc01!hansene From: hansene@hpcc01.HP.COM (Ed Hansen) Newsgroups: comp.databases Subject: Re: Help::: SQL group by/having... Questions!!! Message-ID: <770007@hpcc01.HP.COM> Date: 16 May 91 18:52:56 GMT References: <12146@uwm.edu> Organization: HP Corp Computing & Services Lines: 22 I tried executing your queries in Ingres. Query 1 works as you have indicated; Query 2 gives an error saying that ' The columns in the SELECT clause must be contained in the GROUP BY clause.'; Query 3 has four rows in the output; +--------+-------------------------+ |pn |txt | +--------+-------------------------+ | 001|Row p0001-3 | | 001|Row p001 | | 004|Row p004 | | 005|Row p005 | +--------+-------------------------+ (4 rows) It seems that what you have is a different implementation and it appears that your implementation gives some unusual results. I wonder what the ANSI standard prescribes. JeanMarie(jeanmar@hpcc31.corp.hp.com)