Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is this possible in SQL?

Re: Is this possible in SQL?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 20 Jul 2002 10:16:51 +0200
Message-ID: <807ijuo9t3dat71irgfov9cmuanki2icea@4ax.com>


On 19 Jul 2002 23:05:50 -0700, rs_arwar_at_hotmail.com (Rauf Sarwar) wrote:

>One way is,
>
>SELECT v1.X, v1.Y
>FROM your_view v1, your_view v2
>WHERE v1.X = v2.X
>AND v1.Y = v2.Y
>AND v1.Z = (SELECT MIN(Z)
> FROM your_view
> WHERE Y = v1.Y)
>/
>
>//Rauf Sarwar

The join in the main query is not necessary and you are using no columns of it in the rest of the query.

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Sat Jul 20 2002 - 03:16:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US