Skip site navigation (1) Skip section navigation (2)

Re: Lowest 2 items per

From: "Relyea, Mike" <Mike(dot)Relyea(at)xerox(dot)com>
To: Oliveiros d'Azevedo Cristina <oliveiros(dot)cristina(at)marktest(dot)pt>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Lowest 2 items per
Date: 2012-06-01 16:35:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
> -----Original Message-----
> From: Oliveiros d'Azevedo Cristina
> Sent: Friday, June 01, 2012 12:28 PM
> To: Relyea, Mike
> Cc: pgsql-sql(at)postgresql(dot)org
> Subject: Re: [SQL] Lowest 2 items per
> Yes, you are right, now, thinking about the way I built it, the query,
> leaves out the corner case of models which have just one consumable.
> I didn't try ur version of the query.
> Does itork now with your improvements ?
> Or were they only gramatical ?
> Best,
> Oliver

I only made grammatical changes necessary for the query to function
(adding a missing FROM, fully qualifying "SELECT Make" as " SELECT
subquery2.Make", etc.)
I tried changing the join type to right and left but that did not have
the desired result.


In response to


pgsql-sql by date

Next:From: Oliveiros d'Azevedo CristinaDate: 2012-06-01 16:58:54
Subject: Re: Lowest 2 items per
Previous:From: Oliveiros d'Azevedo CristinaDate: 2012-06-01 16:28:01
Subject: Re: Lowest 2 items per

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group