Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is this possible in SQL?
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