Hi,
I have a table with company #, items, and dates. An example might be:
I want to select the items per company but only those with the max date (most recent) for that company. So the result from the example table would be:
I'm stuck figuring out how to start. I've tried a few combinations of max(dates) in the where clause but that gives me only items from the highest date in the table, not the highest date per company.
Any suggestions? Thanks
I have a table with company #, items, and dates. An example might be:
Code:
co_num | items | dates
--------------------------
1 abc 2007-04-06
1 xyz 2007-04-06
1 ghi 2006-12-18
...
2 jkl 2007-01-01
2 mno 2006-12-18
...
Code:
1 abc 2007-04-06
1 abc 2007-04-06
2 jkl 2007-01-01
Any suggestions? Thanks