First page Back Continue Last page Image
Same result without using a SELECT subquery
SELECT vendor_name, MAX(invoice_date) AS latest_inv
FROM vendors v
LEFT JOIN invoices i ON v.vendor_id = i.vendor_id
GROUP BY vendor_name
ORDER BY latest_inv DESC
This query produces the same result and it is easier to read and understand