I have a table with the following data:
=========================================
| name | version | project_id |
=========================================
| foo | 1| 1|
| new foo | 2| 1|
| bar | 1| 2|
=========================================
How can I write a query that returns the highest version record for each product? from the table above, I’d want the following results:
=========================================
| name | version | project_id |
=========================================
| new foo | 2| 1|
| bar | 1| 2|
=========================================
1 Answer