Re: DISTINCT ON troubles

From: "Jeremy Smith" <jer(at)highboard(dot)com>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: DISTINCT ON troubles
Date: 2004-02-19 19:34:39
Message-ID: FKEOIJEHOIKIOEHCGNCLIENGEDAA.jer@highboard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Thanks Josh,

I'll do that, I just wasn't sure if I was missing something obvious.

Jeremy

-----Original Message-----
From: Josh Berkus [mailto:josh(at)agliodbs(dot)com]
Sent: Thursday, February 19, 2004 2:29 PM
To: jer(at)highboard(dot)com; pgsql-sql(at)postgresql(dot)org
Subject: Re: [SQL] DISTINCT ON troubles

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 Tom Lane 2004-02-19 20:06:21 Re: CHAR(n) always trims trailing spaces in 7.4
Previous Message Josh Berkus 2004-02-19 19:28:51 Re: DISTINCT ON troubles