SQL Write a SELECT statement then returns two columns from the GLAccounts table:
ID: 3782320 • Letter: S
Question
SQL
Write a SELECT statement then returns two columns from the GLAccounts table: AccountNo and AccountDescription. The result set should have one row for each account number that has never been used. Sort the final result set by AccountNo.
Hint: use an outer join to the InvoiceLineItem table. To code “account number that has never been used” ---- WHERE InvoiceLineItems.AccountNo IS NULL
Here is result set with 54 rows:
Explanation / Answer
SELECT AccountNo, AccountDescription FROM GLAccounts FULL OUTERJOIN ON InvoiceLineItem WHERE InvoiceLineItems.AccountNo IS NULL ORDERBY AccountNo;
if you like this answer, please give a thumbs up and if you have some doubt just ask in the comment section below. I will try to help. Cheers
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.