473,396 Members | 1,743 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

maximum query

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
1 1129
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

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

Similar topics

2
by: mr_burns | last post by:
hi, how do i do a SELECT statment that will just query a table to find the row with the maximum of a declared field. for example, if i have a table of customers and i would like to get the value...
0
by: David.Tymon | last post by:
>Description: MySQL v4.1.0-alpha only allows a client to prepare a maximum of 254 statements. On the 255th mysql_prepare() call, a failure is returned with no information returned by...
8
by: Maddman | last post by:
Newbie here. I've got my database set up in SQL 2000, and have started an Access adp for a front end. I have 10 licenses, and at the moment the only accesses are the server through Remote...
0
by: Gregg | last post by:
I am trying to pass the maximum order number from a table of orders into one record only in another table. I created an update query and created the following: Field: next_fpo_no Table:...
4
by: benignor | last post by:
Hi, I have a query that looks like this: PatientID LastVisit LastMed LastVaccine 1001 1/1/2004 3/1/2004 10/1/2004 1002 10/1/2005 3/1/2004 ...
2
by: Michael.Suarez | last post by:
In MS Sql Server 2000, if you run a stored procedure that query's more than 8 databases, you get this error gets raised: Maximum number of databases used for each query has been exceeded. The...
5
by: alingsjtu | last post by:
Hello, every body. When execute dynamic generated multiple OPENQUERY statements (which linkes to DB2) in SQLServer, I always got SQL1040N The maximum number of applications is already connected...
11
by: =?Utf-8?B?VmxhZCBIcnlib2s=?= | last post by:
Using IIS7, Vista x64, ASP.NET 2.0. I am getting HTTP 400 "Bad Request" for the following URL:...
10
by: janieavis | last post by:
If I run this query I can see there are 2 records with the dates 10 August 2009 and 24 August 2009: SELECT dbo_JobMain.BpaMainPKey, dbo_JobMain.JobDefinitionPKey, dbo_JobMain.Value,...
4
by: SjaakBanaan | last post by:
Hey all, I have a question that ought to be simple but has given me headaches for a while. I have a table with contact email addresses, say. T ID ContID Priority Emailaddress...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.