467,161 Members | 1,128 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

maximum query

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
  • viewed: 1011
1 Reply
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.

Similar topics

2 posts views Thread by mr_burns | last post: by
reply views Thread by David.Tymon@safehouse.com.au | last post: by
8 posts views Thread by Maddman | last post: by
2 posts views Thread by Michael.Suarez@gmail.com | last post: by
11 posts views Thread by =?Utf-8?B?VmxhZCBIcnlib2s=?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.