Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Query to Select Items with Largest Number
Gary Becker 
     
3 months ago
I wonder if there is a way to do this with a query. See the following list of sample data. Each Number is a set of data for a Job--and I want the query to return the data with the largest Number for each Job.
Gary Becker OP  @Reply  
     
3 months ago

Adam Schwanz  @Reply  
           
3 months ago
So what do you want that to return? When you say number do you mean the column that you have called number? Or the Inventory number? Like C1226 Job has two records on "Number 2" which should it return for that?
Gary Becker OP  @Reply  
     
3 months ago
I want it to return only the records for each "Job" that have the greatest value in the "Number" column. For example, there are many records for C1226, but I want it to return only the records for C1226 that have "Number" 6 and the records for for C1228 that have the Number 3 and so on. Each group of Job records could have multiple records with the largest value in the Number field.
Adam Schwanz  @Reply  
           
3 months ago
My Table is 1JobT (Change to your table). My Fields are Job, JobNumber, Inventory (Change to your Fields). Paste it into SQL view of a query.

SELECT T.*
FROM 1JobT AS T
INNER JOIN
(
    SELECT Job, Max([JobNumber]) AS MaxNumber
    FROM 1JobT
    GROUP BY Job
)  AS Q
ON  T.Job = Q.Job
AND T.[JobNumber] = Q.MaxNumber;
Adam Schwanz  @Reply  
           
3 months ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/8/2026 6:15:34 AM. PLT: 0s