Re: Distinct Values

Поиск
Список
Период
Сортировка
От Hans-Jürgen Schönig
Тема Re: Distinct Values
Дата
Msg-id 3B1CA3F2.11015CC7@cybertec.at
обсуждение исходный текст
Ответ на Distinct Values  ("Nicolas" <bnk@medialife.net>)
Список pgsql-sql
Nicolas schrieb:

> Hi,
>
> I'm trying to retreive DISTINCT Values from a two colomn table called
> "Books". The colomns are named "Author" and "URL".
> DISTINCT values should be retieved from the "Author" Colomn , and then I
> should be able to retrieve the corresponding URL.
> How do I build the SQL Query ?
> I tried to use: "SELECT DISTINCT Author FROM Books" But this does not allow
> me to fetch the URL value on the other colomn.
>
> Thanks
> Nicolas

The problem is that one author may have multiple urls - if you want to select
the url too, the database does not know which url to retrieve.
   Hans



В списке pgsql-sql по дате отправления:

Предыдущее
От: mikael.kjellstrom@_no_spam_flygtaxi.se (Mikael Kjellström)
Дата:
Сообщение: Cluster and primary key
Следующее
От: "Postgresql"
Дата:
Сообщение: cascading delete - recursivity