I am trying to select multiple rows from a database based on the date (descending), and making sure that I do not get any rows that have the same part number. So basically I need to do something like this:
SELECT `part_number`, `second_field`, `third_field`, `date`
FROM `my_table`
GROUP BY DISTINCT('part_number'), order_date DESC
I know the syntax for this query is not correct, I am just not sure how to do it. I think there is a possibility I might need to use ORDER BY too.