Hi,
I want to select the lastest date from a table. But since alot of records have the same date, I end up with multiple records and I simply want to get one record. So I want to select the max date and also the max ID (which is the primary key)
Current Query
Thank you for the help of PHV on my last post.
I want to select the lastest date from a table. But since alot of records have the same date, I end up with multiple records and I simply want to get one record. So I want to select the max date and also the max ID (which is the primary key)
Current Query
Code:
SELECT A.*
FROM PROFILES AS A
WHERE A.ACTIVE = 1 AND A.PROFILE_TYPE = 'TEST'
AND A.DATE = (SELECT Max(B.DATE) FROM PROFILES AS B WHERE B.ACTIVE = 1 AND B.PROFILE_TYPE = 'TEST')
Thank you for the help of PHV on my last post.