Hi,
I'm trying to query a table in order to get the latest record with MAX(DATE)
I have 2 conditions before selecting the lastest record. I cannot use the SELECT MAX statement in my initial SELECT statement because I need to check the records against the 2 conditions before.
I'm trying to query a table in order to get the latest record with MAX(DATE)
I have 2 conditions before selecting the lastest record. I cannot use the SELECT MAX statement in my initial SELECT statement because I need to check the records against the 2 conditions before.
Code:
SELECT *
FROM PROFILES
WHERE ACTIVE = 1
AND PROFILE_TYPE = 'TEST'
ORDER BY DATE