Re: nested sql

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: Sat, 09 Aug 2008 20:03:11 +0200
Message-ID: <489DDBDF.6050401@gmail.com>


Shirley Cohen schrieb:
> Hi,
>
> I need help with a sql statement. Suppose I have a table
> movies(movie_title, movie_rating, date_rated, user) and I want to find
> the highest ranked movies for each user. Rather than write several sql
> statements, I'd like perform this query in a single nested sql
> statement. Does anyone know how to do that?
>
> Thanks,
>
> Shirley

Probably you can do it utilizing analytic functions http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions001.htm#i81407 If you need more detailed advice, you need to provide more detailed info, like your oracle version, sample data, sample of desired output, what the logic should be if some movies are equally high rated for certain users etc.
And it would be nice to see, what you have tried sofar.

Best regards

Maxim Received on Sat Aug 09 2008 - 13:03:11 CDT

Original text of this message