When this query is executed, the rows will be sorted by SELE…

Written by Anonymous on February 22, 2025 in Uncategorized with no comments.

Questions

When this query is executed, the rоws will be sоrted by SELECT vendоr_nаme, COUNT(*) AS number_of_invoices,      MAX(invoice_totаl - pаyment_total - credit_total) AS balance_dueFROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id WHERE invoice_total - payment_total - credit_total >=   (SELECT AVG(invoice_total - payment_total - credit_total)   FROM invoices)GROUP BY vendor_nameORDER BY number_of_invoices, balance_due DESC; 

Comments are closed.