maximum query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mnathg
    New Member
    • Mar 2007
    • 1

    maximum query

    i have a table marks having feilds application_no, qualification,y ear,maxmarks,ob tainedmarks.
    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.
  • getmeidea
    New Member
    • Feb 2007
    • 36

    #2
    Here I assume application_no is unique, table name is "test_resul t"

    select * from
    (select qualification, application, max(obtainedmar ks) obtainedmarks
    from test_result group by qualification, application) summary
    inner join test_result details
    on summary.qualifi cation = details.qualifi cation and summary.obtaine dmarks = details.obtaine dmarks and summary.applica tion= details.applica tion

    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

    Comment

    Working...