On Thu, 13 Mar 2003 01:34:34 -0600, "Len Morgan" <[EMAIL PROTECTED]> wrote: >>GROUP BY > > field1, > > field2, > >name; >I think the problem is that you don't have a column to group on.
field1, field2, and name are the grouping columns. >Try adding >SELECT ....,count(*).... so that there is an aggregate of some kind. You don't need an aggregate in a GROUP BY query. A SELECT ... GROUP BY without any aggregate behaves like SELECT DISTINCT. There's nothing wrong with it. Performance might be a different story. BTW, Franco's problem has been recognised as a bug and a patch has already been published (cf. Tom Lane's mail in this thread). Servus Manfred ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html