#987

Newest Paid Orders First

The report reads rows from orders with status = 'paid' and shows newest created_at values first. Add a composite index on status and created_at, accounting for reverse date order.

Speed this query up with an index
CREATE INDEX ix_orders_status_created ON orders (status, created_at DESC)

Solo CREATE/ALTER/DROP — no hace falta un SELECT al final.

Aquí aparecerá el resultado de tu consulta