Topic: max/min functions in select statements
Hi,
I am trying to get the latest timestamp for each group in a table using:
SELECT EntryID, max(EntryDate) FROM Entries GROUP BY EntryID;
The query works if I use it in SQLite Database Browser but fails in SQLiteToolbox or when I try to use in a Lazarus program.
When running the program I get an EDatabaseError with message: TSqlitePassSelectStmt.BuildSchema : Table or field not found .
Is there some easy workaround I could do or will I have build a table myself going through each ID and get the latest date?