I am struggling to find the correct syntax for my query.
For simplicity purposes, let's say my db table has 5 columns: id, Name, Date, Year, Month
I need to identify the last record in the db based on the MAX(Date) where the report Name='Activity Report'. What further complicates this query is the fact that I need to be able to grab all of the information from the DB row found so that I can print it to the screen later.
This is what I have so far:
SELECT MAX(Date) as most_recent, id, Name, Date, Year, Month FROM reports WHERE Name='Activity Report' ORDER BY Name ASC
I know this is not correct but, all of the examples I have seen just confuse me even more.
Can anyone assist?