Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(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

image text in transcribed

(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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4. Identify the challenges facing todays organizations

Answered: 1 week ago