File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQL Query

 
RaviSingh Kumar
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just want an SQL query for the below mentioned condition.

There are several department having some number of employees.
Want the department id and respective salary for the department having maximum of average salary group by department.

Thanks in advance
 
Campbell Ritchie
Sheriff
Pie
Posts: 47293
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know myself. And I shan't know. We don't simply give out answers to that sort of question. Read this. Please post what you think and I am sure somebody will help.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33699
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are stuck, try starting with a smaller query. Can you figure out how to write a query to get the highest salary of an individual employee? How about the average salary for a single department? All the departments? etc

When you get stuck, post the last query you were able to write (that solves a smaller problem) and let us know what you got stuck on. This will let people give you more concrete help and will help you learn how to write queries. Handing out an answer doesn't do that.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic