Question: (a) Write a SELECT command that returns two columns from the General Ledger_Accounts table, namely, account number and account description. The purpose is to identify

 (a) Write a SELECT command that returns two columns from the

(a) Write a SELECT command that returns two columns from the General Ledger_Accounts table, namely, account number and account description. The purpose is to identify each distinct account number that has never been used in an invoice (via an invoice line item). The order of the resulting list should be by account number. It will be helpful to use a subquery and the NOT EXISTS operator for this command. (b) Then write two result dataset rows of sample data that might be retrieved by the query. What is actually retrieved depends on what is in the table. The data you write does not have to match any data that is actually in our sample tables The table structures are also shown for information Table: invoice line items Column Name invoice id invoice sequence NUMBER account numberNUMBER line item amt line item description VARCHAR2(100) No Data Type NUMBER Nullable Default Data Constraint No No No No PK,FK PK FK NUMBER(9,2) Table: general ledger accounts Column Name Data Type Nullable Default Data Constraint number No PK account description varchar2(50) No UNIQUE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!