Re: DISTINCT ON troubles

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: <jer(at)highboard(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: DISTINCT ON troubles
Date: 2004-02-19 19:28:51
Message-ID: 200402191128.51124.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Jeremy,

> Am I just approaching this all wrong and need to create a temporary table
> and draw from that, or is there a way to salvage this query?

Think about using a subquery instead of the DISTINCT ON approach. I don't
think you can get what you want with DISTINCT ON.

A temporary table is not necessary.

--
-Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jeremy Smith 2004-02-19 19:34:39 Re: DISTINCT ON troubles
Previous Message Josh Berkus 2004-02-19 19:26:26 Re: Compiling pl/pgsql functions