Re: DISTINCT ... ORDER BY - Mailing list pgsql-novice

From Nabil Sayegh
Subject Re: DISTINCT ... ORDER BY
Date
Msg-id 3FA95846.2020701@e-trolley.de
Whole thread Raw
In response to Re: DISTINCT ... ORDER BY  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Responses Re: DISTINCT ... ORDER BY  (Bruno Wolff III <bruno@wolff.to>)
Re: DISTINCT ... ORDER BY  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-novice
Stephan Szabo wrote:

> Your step 3 above isn't well defined in general.  There's no single place
> in the sort order for a value of a column being distincted when the value
> occurs multiple times.  In the data above, col1='b' occurs twice in the
> sort order and you need to give an indication of which place in the sort
> order you want to use.

Ok, let's look for alternatives.

Is it possible to add a serial column to my ordered result ?

I hope there is a way to do it without temporary tables as I want to keep
it all in 1 query.

TFYH
--
  e-Trolley Sayegh & John, Nabil Sayegh
  Tel.: 0700 etrolley /// 0700 38765539
  Fax.: +49 69 8299381-8
  PGP : http://www.e-trolley.de


pgsql-novice by date:

Previous
From: "Corey W. Gibbs"
Date:
Subject: Remove Unused Blobs?
Next
From: Bruno Wolff III
Date:
Subject: Re: DISTINCT ... ORDER BY