From: Christoph Haller <ch@rodos.fzk.de>
To: pgsql-sql@postgresql.org
Cc: cprice@hrdenterprises.com
Subject: Re: LIMIT and SUBQUERIES
Date: Wed, 05 Mar 2003 14:24:27 +0100
Message-ID: <3E65FA8B.352136E@rodos.fzk.de> (raw)
>
> So anyway, I have the query that is working - but it returns all
> records for all owners, when what I really want to do is return the
> top 5 per each owner.
>
I've seen a lot of questions like this on the list before about
filtering
result sets. Within the most replies, people were told to use middleware
stuff like perl, awk, sed, ... to filter out unwanted rows, because SQL
was not intended to do so.
Incidentally, I've seen
http://techdocs.postgresql.org/guides/SetReturningFunctions
Maybe this is more useful than telling you 'use a script'.
Regards, Christoph
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: ch@rodos.fzk.de, cprice@hrdenterprises.com
Subject: Re: LIMIT and SUBQUERIES
In-Reply-To: <3E65FA8B.352136E@rodos.fzk.de>
* 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