Is there a way I can do a query in OQL where I can find the objects with the latest date?
For example, I have a Ticket class which also records the date when it is submitted. How can I find the ticket which was the latest submitted? What will be the OQL query. Since there is no LIMIT or ORDER BY in OQL , how can I accomplish this?
I did try this but looks like the MAX function doesn't work in OQL
SELECT Ticket WHERE MAX(DAY(submit_date))
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there a way I can do a query in OQL where I can find the objects with the latest date?
For example, I have a Ticket class which also records the date when it is submitted. How can I find the ticket which was the latest submitted? What will be the OQL query. Since there is no LIMIT or ORDER BY in OQL , how can I accomplish this?
I did try this but looks like the MAX function doesn't work in OQL
SELECT Ticket WHERE MAX(DAY(submit_date))