troubleshooting Question

Dictinct question

Avatar of kneidels
kneidels asked on
SQL
4 Comments1 Solution232 ViewsLast Modified:
hey there

i have a simple MS Access table, and i always seem to have trouble qith distinct queries...

table images:

imageID -- imageName -- cat -- subcat -- uploadDate
---------------------------------------------------------------
1 -----------  test ---------- 2 ------ 5 ---------- 05/05/08
2 -----------  test2 --------- 2 ------ 7 ---------- 05/05/08
3 -----------  test3 --------- 2 ------ 6 ---------- 05/05/08
4 -----------  test4 --------- 2 ------ 5 ---------- 05/05/08
5 -----------  test5 --------- 2 ------ 5 ---------- 05/05/08

i would like to extract the top X records, but only one from each subcat - order by imageID DESC
so in the above example, i would want to  get all the fields , in rows 2, 3 and 5.

whatever i try i get Distinct errors.

any help?

thanks!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros