Re: Distinct Values

From: Hans-Jürgen Schönig <hs(at)cybertec(dot)at>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Distinct Values
Date: 2001-06-05 09:20:56
Message-ID: 3B1CA478.B91CBEED@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I want a "dirty" solution try something like that. If you use "group by
author" url must be in aggregate function. The authors are now DISTINCT.

myjava=# SELECT author, max(url) FROM books group by author;
author | max
--------+---------
abc | dsafsdf
cde | sdfdsf
(2 rows)

Hans

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Matteo Centenaro 2001-06-05 11:16:28 problem with Pl/Pgsql function
Previous Message Hans-Jürgen Schönig 2001-06-05 09:18:42 Re: Distinct Values