You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

exec_5C67.sql 387B

123456789
  1. use ap;
  2. SELECT vendor_name, invoice_number, invoice_date, line_item_amount, account_description
  3. FROM vendors v
  4. JOIN invoices i
  5. ON v.vendor_id = i.vendor_id JOIN invoice_line_items li
  6. ON i.invoice_id = li.invoice_id JOIN general_ledger_accounts gl
  7. ON li.account_number = gl.account_number WHERE invoice_total - payment_total - credit_total > 0
  8. ORDER BY vendor_name, line_item_amount DESC