Updated SQL query that fetches invoices by adding the 'ORDER BY' clause