First page Back Continue Last page Image

The Same Query with a Join to Get the

SELECT vendor_name, vendor_state,

ROUND(AVG(invoice_total), 2) AS average_invoice_amount

FROM vendors JOIN invoices

ON vendors.vendor_id = invoices.vendor_id

GROUP BY vendor_name

HAVING AVG(invoice_total) > 2000

ORDER BY average_invoice_amount DESC

Here I have used a JOIN so I can grab the vendor name rather than using the vendor address from the last query

I want a name here not a number, this is why I changed the query