I have a classic question about getting the latest record from a table. Here is the statement:
SELECT t1.Item, t1.Price, t1.ODate
FROM Order AS t1
JOIN ( (SELECT Item, Price, Max(ODate) As MaxDate
FROM Order
GROUP BY Item ) As t2 )
ON t1.Item = t2.Item and t1.Odate = MaxDate
ORDER BY t1.Item ASC
This statement works on both phpMyAdmin and LibreOffice base, but LibreOffice basic gives me a Message: Syntax error in SQL expression.
Any help?