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.
12345678910 |
- SELECT vendor_name,
- COUNT(DISTINCT li.account_number) AS number_of_gl_accounts
- FROM vendors v
- JOIN invoices i
- ON v.vendor_id = i.vendor_id
- JOIN invoice_line_items li
- ON i.invoice_id = li.invoice_id
- GROUP BY vendor_name
- HAVING number_of_gl_accounts > 1
- ORDER BY vendor_name
|