By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,767 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,767 IT Pros & Developers. It's quick & easy.

maximum query

P: 1
i have a table marks having feilds application_no,qualification,year,maxmarks,obtaine dmarks.
in this each year's marks are entered for each qualification andn application.
i want to get maximum of percentages and the qualification for each application. can anybody help me.

thanks in advance.
Sep 28 '08 #1
Share this Question
Share on Google+
1 Reply

P: 36
Here I assume application_no is unique, table name is "test_result"

select * from
(select qualification, application, max(obtainedmarks) obtainedmarks
from test_result group by qualification, application) summary
inner join test_result details
on summary.qualification = details.qualification and summary.obtainedmarks = details.obtainedmarks and summary.application= details.application

This will give you the idea how to create the query, first understand how the result will be formed and do it in the same way given
Sep 29 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.