Code:
SELECT Max(date_of_status_change) as [date_change], end_status
FROM Order_status_history
WHERE order_number = 39;
I cant get the above query to work. All I want it to do is pick out all the rows where the order_number is 39. Then select the one which has the most recent date_of_status_change, and show the "end_status" field.
I cant understand what is wrong with the query.