To retrieve the maximum Price value, a simple aggregate query is all that is
needed:
SELECT MAX(Price) FROM YourTable
However, in order to get any other column values from the table, you use
this as a subquery in a criteria:
SELECT id, Price
FROM YourTable
WHERE Price =
(SELECT MAX(Price) FROM YourTable)
Note that, if two or more rows have this highest price value, they will all
be returned.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.