Home » SQL & PL/SQL » SQL & PL/SQL » Fetch data based max data and rowcount (oracle)
Fetch data based max data and rowcount [message #446254] Sun, 07 March 2010 03:31 Go to next message
ketansetia
Messages: 1
Registered: March 2010
Location: delhi
Junior Member
I have the following data with me

AddId Salaries
10 600
10 50
10 400

10 300
10 200
10 600
20 200

30 200
30 600
30 300


Required output should be

The average of the three highest salaries exceeds 100, only those rows should be visible...wrt each addid.

Thanks,
Ketan
Re: Fetch data based max data and rowcount [message #446258 is a reply to message #446254] Sun, 07 March 2010 04:02 Go to previous message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Top N queries are among the most asked above all by students.
Search is the FIRST thing a student should learn, BEFORE asking others to do their homework.

Post what you tried.

Also you should know the rules of the forum you post, so please read OraFAQ Forum Guide.

Always post a working Test case: create table and insert statements along with the result you want with these data.

Regards
Michel
Previous Topic: check_constraint
Next Topic: Trigger sum constraints
Goto Forum:
  


Current Time: Fri Sep 30 00:25:31 CDT 2016

Total time taken to generate the page: 0.16152 seconds