I have an orders table with a schema like this.
CREATE TABLE orders (
order_id int NOT NULL AUTO_INCREMENT,
customer_id int unsigned NOT NULL DEFAULT 0,
order_date int NOT NULL
)
I'm trying to retrieve a list of each customers most recent order. The table can have multiple orders by a customer, and each order has a primary key of order_id.