File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes query for maximum marks Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "query for maximum marks" Watch "query for maximum marks" New topic

query for maximum marks

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
this is my question
Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

Hi. Hope this is not your homework.

In your sql statement,
use the "max()" aggregation function to find the maximum marks,

to make the max() function aggregate on subject level,
group by subjectid by adding a "group by" clause.

OCUP UML fundamental and ITIL foundation
I agree. Here's the link:
subject: query for maximum marks
It's not a secret anymore!