The result оf this query will cоntаinSELECT vendоr_nаme, COUNT(*) AS number_of_invoices, AVG(invoice_totаl - payment_total - credit_total) AS avg_balance_dueFROM vendors v JOIN invoices i ON v.vendor_id = i.vendor_id WHERE invoice_total - payment_total - credit_total