Hi Ade,
Is there a StudentID in your table/query? I assume you would like a query that returns for each student their math mark as well as their top five subjects by mark excluding math.
How would you handle ties?
Can you provide actual table and field names?
Here is a query from the Northwind Orders table that displays the top 3 orders for each customer by Freight:
SELECT Orders.CustomerID, Orders.OrderDate, Orders.Freight
FROM Orders
WHERE (((Orders.OrderDate) In (SELECT TOP 3 O.OrderDate FROM Orders O where O.CustomerID = Orders.CustomerID ORDER BY O.OrderDate DESC )))
ORDER BY Orders.CustomerID, Orders.OrderDate DESC;
Regards,
Duane
From: MS_Access_Professionals@yahoogroups.com <MS_Access_Professionals@yahoogroups.com> on behalf of Adeboyejo Oyenuga aoye_99@yahoo.co.uk [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com>
Sent: Friday, March 23, 2018 10:08 AM
To: wrmosca@comcast.net [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Re: BEST SIX SUBJECTS
Sent: Friday, March 23, 2018 10:08 AM
To: wrmosca@comcast.net [MS_Access_Professionals]
Subject: Re: [MS_AccessPros] Re: BEST SIX SUBJECTS
Thanks Bill. Scores in Maths must be in regardless of the marks obtained. The others are the highest marks in five subjects among the remaining subjects.
Ade
On Friday, 23 March 2018, 14:54:35 GMT, wrmosca@comcast.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
Ade - what determines the 6 "best" subjects?
Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com
---In MS_Access_Professionals@yahoogroups.com, <aoye_99@yahoo.co.uk> wrote :
Hi all,
the data below is hypothetical results of a student for simplicity in a situation where there are thousands of students who study varying number of subjects, with Maths being compulsory.
Would you know of a function that will help calculate the total marks in six best subjects ?
Thanks.
Ade
S/NO | SUBJECT | MARKS | |
1 | Maths | 70 | |
2 | English | 85 | |
3 | Science | 81 | |
4 | History | 90 | |
5 | Chemistry | 64 | |
6 | Biology | 91 | |
7 | Agric | 72 | |
8 | Physics | 50 | |
9 | Music | 68 | |
10 | Greek | 59 | |
Sum of Best Six Marks | 489 | ||
__._,_.___
Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.
.
__,_._,___
Tidak ada komentar:
Posting Komentar