So I am doing homework for mysql class and I am having a hard time understanding why my code is bringing back no data, it runs but returns nothing when I know that data that meets the criteria exists. Please help. Here is my code:
SELECT vendor_id
, SUM(invoice_total) AS invoice_gt
, AVG(invoice_total) AS invoice_avg
, COUNT(invoice_id) AS invoice_qty
FROM invoices
WHERE "invoice_avg" > 300
GROUP
BY vendor_id
ORDER
BY "invoice_avg" DESC