Grouping and aggregates

From: "Peter Darley" <pdarley(at)kinesis-cem(dot)com>
To: "Pgsql-General" <pgsql-general(at)postgresql(dot)org>
Subject: Grouping and aggregates
Date: 2002-06-04 17:55:56
Message-ID: NNEAICKPNOGDBHNCEDCPOEHMCJAA.pdarley@kinesis-cem.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Friends,
I've got the following query, which doesn't work because you apparently
can't group by table.*. I was wondering if there was any way to write this
without having to have every field listed in the GROUP BY?

My query:
SELECT code_list.* FROM code_list LEFT JOIN codes ON
code_list.id=codes.codeid GROUP BY code_list.* ORDER BY Count(codes.id);

Thanks,
Peter Darley

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joel Burton 2002-06-04 18:07:58 Re: Grouping and aggregates
Previous Message Andrew Sullivan 2002-06-04 17:46:25 Re: Re : Solaris Performance - 64 bit puzzle