Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Showing the most RECENT DataAdded

Author  Topic 

jesus4u
Posting Yak Master

204 Posts

Posted - 2003-10-20 : 16:24:38
This is in Access..... Along with returning the number of records for each job title, I also need to just show the most recent Date that was added for each count.


SELECT Count(RESUME.HearAbout) AS NumHearAbout, RESUME.HearAbout
FROM RESUME
GROUP BY RESUME.HearAbout
ORDER BY Count(RESUME.HearAbout) DESC , RESUME.HearAbout;


Output from above code:

NumHearAbout HearAbout
40                 Website Other
33                 TV Other
23                  Friend
14                  Other


Alex Polajenko

Moved to Access Forum - robvolk

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-20 : 16:26:04
Access questions go in the Access forum.

Does MAX work in Access?

Tara
Go to Top of Page

mohdowais
Sheikh of Yak Knowledge

1456 Posts

Posted - 2003-10-21 : 02:20:26
quote:
Does MAX work in Access?

You bet it does!!

SELECT Count(RESUME.HearAbout) AS NumHearAbout, MAX(SomeDate) AS MostRecentlyHeard, RESUME.HearAbout
FROM RESUME
GROUP BY RESUME.HearAbout
ORDER BY Count(RESUME.HearAbout) DESC, RESUME.HearAbout;

Owais


Make it idiot proof and someone will make a better idiot
Go to Top of Page
   

- Advertisement -