First page Back Continue Last page Image

A Subquery that uses the ANY Keyword

SELECT vendor_name, invoice_number, invoice_total

FROM vendors JOIN invoices

ON vendors.vendor_id = invoices.vendor_id

WHERE invoice_total < ANY

(SELECT invoice_total

FROM invoices

WHERE vendor_id = 115)

A problem with your accounting system is causing small invoices to not get paid, you discovered this on Vendor 115 but you want to know if it is happening anywhere else

Results of the Subquery

Results of the Parent Query