Write a SQL statement to retrieve customer id (cust_id) and order number (order_num) from the Orders table, and sort the results first by customer id, and then by order date in reverse chronological order.


SELECT cust_id, order_num
FROM Orders
ORDER BY cust_id, order_date DESC;

Comment on this FAQ