From: Josh Berkus <josh@agliodbs.com>
To: jer@highboard.com
To: pgsql-sql@postgresql.org
Subject: Re: DISTINCT ON troubles
Date: Thu, 19 Feb 2004 11:28:51 -0800
Message-ID: <200402191128.51124.josh@agliodbs.com> (raw)
In-Reply-To: <FKEOIJEHOIKIOEHCGNCLEENEEDAA.jer@highboard.com>
References: <FKEOIJEHOIKIOEHCGNCLEENEEDAA.jer@highboard.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, jer@highboard.com
Subject: Re: DISTINCT ON troubles
In-Reply-To: <200402191128.51124.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox