Question: SQL Select Statements. I have attached photos of the SQL code for the creation of the tables, and then the insertion of data into said

SQL Select Statements.
I have attached photos of the SQL code for the creation of the tables, and then the insertion of data into said tables.
Please can you help me (each in separate SELECT statements):
> Perform both a projection and a selection in a single statement
> Create a computed column
> Make a group calculation
> Perform an inner join on two tables
> Perform an inner join on more than two tables
Thank you in advance.
SQL Select Statements. I have attached photos of the SQL code for
the creation of the tables, and then the insertion of data into

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 DROP TABLE item CASCADE CONSTRAINTS; CREATE TABLE item( id varchar2(5) PRIMARY KEY, -- was 100 in Base description varchar2(100) NOT NULL, price number(6,2) NOT NULL -- was 100 in Base ); DROP TABLE invoice_address CASCADE CONSTRAINTS; CREATE TABLE invoice_address name varchar2(100) PRIMARY KEY, address varchar2(100) NOT NULL ); DROP TABLE invoice CASCADE CONSTRAINTS; CREATE TABLE invoice invoice_no number (10) PRIMARY KEY, date_ordered date NOT NULL, customer_no varchar2(5) NOT NULL, -- are we missing a customer talble invoice_name varchar(100) references invoice_address(name), subtotal number(6,2) NOT NULL, tax number(6,2) NOT NULL, delivery number(6,2) NOT NULL, total number(6,2) NOT NULL ); DROP TABLE invoice_item CASCADE CONSTRAINTS; CREATE TABLE invoice_item( invoice_no number(10) references invoice(invoice_no), item_id varchar2(5) references item(id), quantity number (3) NOT NULL, amount number(6,2) NOT NULL, Primary key(invoice_no, item_id) 1 2 3 5 6 7 8 9 10 11 12 INSERT INTO item VALUES ('PCI', 'Computer', 500.00); INSERT INTO item VALUES ('MN2', 'Monitor', 200.00); INSERT INTO item VALUES ('LP1', 'Printer, 156.00); INSERT INTO invoice_address VALUES("H. Jones'; 19. The Avenue Harrogate HG2 7LR'); INSERT INTO invoice VALUES(1834, '01-31-2015', 'C101', 'H. Jones', 2256.00, 251.20, 35.00, 2742.20); INSERT INTO invoice_item VALUES (1034, PC1', 3, 1500.00); INSERT INTO invoice_item VALUES(1034, MN2, 3, 600.00); INSERT INTO invoice_item VALUES(1034, LP1', 1, 156.00)

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!