am 23.08.2005, um 0:24:53 +1200 mailte Bernard folgendes: > SELECT > DEPARTMENT.PK, > DEPARTMENT.NAME, > MIN(PROJECT.VALUE)AS RATING > FROM DEPARTMENT, > PROJECT > WHERE DEPARTMENT.PK=PROJECT.DEPARTMENT_FK > GROUP BY DEPARTMENT.PK > ORDER BY DEPARTMENT.PK; > > ERROR: column "department.name" must appear in the GROUP BY clause or > be used in an aggregate function Add a ',department.name' to the 'GROUP BY' -> ... PROJECT WHERE DEPARTMENT.PK=PROJECT.DEPARTMENT_FK GROUP BY DEPARTMENT.PK, department.name ORDER BY DEPARTMENT.PK; ... Regards, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47212, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net === Schollglas Unternehmensgruppe === ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq