Re: question about a select - Mailing list pgsql-general

From Stephan Szabo
Subject Re: question about a select
Date
Msg-id 20031009142549.K73599@megazone.bigpanda.com
Whole thread Raw
In response to question about a select  (Cindy <ctmoore@uci.edu>)
Responses Re: question about a select  (Cindy <ctmoore@uci.edu>)
List pgsql-general
On Thu, 9 Oct 2003, Cindy wrote:


> Text=# select distinct on (y_level) y_level, byteloc from
> citations_by_level where aid=543 and wid=1 order by byteloc;
> ERROR:  SELECT DISTINCT ON expressions must match initial ORDER BY
> expressions

Maybe something like:

select y_level from (select distinct on (y_level) y_level,
byteloc from citations_by_level where aid=543 and wid=1) tab order by
byteloc;

pgsql-general by date:

Previous
From: Cindy
Date:
Subject: question about a select
Next
From: Karsten Hilbert
Date:
Subject: Re: SQL query problem