Hey guys, I have been working on the query running against MS access database.
The table has multiple columns and two of them (which are vital to this query) are Date and ItemN ( suggesting Item number).
There are multiples which show multiple entries for single itemN, for example.
item 1 has three date entries as compared to item 2 which has one entry, corresponding to one item number.
The query condition is to fetch the distinct item number against its latest entry in date. I am trying to use this query:
SELECT field name1, field name2,...field name9, max(date) as dt FROM (SELECT * FROM TABLEname ORDER BY DATE DESC) group by fieldname1, fieldname2, ..fieldname9, dt;
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!