Top N Per Group

jamesdpmullan

Registered User.
Local time
Today, 23:24
Joined
Oct 21, 2013
Messages
24
Hi

I have been trying endlessly to get this working but to no avail. I have looked and used sample codes posted on the net.

Im trying to get top 1 [route_list_code] per [works_order_number]

I have attached three images:

- Query as isQL code
- Query with top n in criteria (pulling wrong information and its just by coincidence that the two records shown are split by group)

Can someone take a look and see what i am doing wrong. The code appears to just pull top # record (not per group)

Any help appreicated

as is.JPG

SQL code.JPG

query with top n in criteria.JPG
 
Have you reviewed this from Allen Browne?
See Top N on the page.

Good luck
 
great source of information, thanks! :)
 

Users who are viewing this thread

Back
Top Bottom