Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a query that shows the total number of orders that have shipped in 2008. Label the data Orders Shipped in 2008. Write a query

  1. Write a query that shows the total number of orders that have shipped in 2008. Label the data "Orders Shipped in 2008".
  2. Write a query that shows the earliest publication date of books in the children category.
  3. Write a query that displays each shipstate along with the number of orders shipped to that state. Display the results in descending order by state.
  4. Write a query that displays order number and the total paid for each order. Format the amount using dollars and cents. Label the total amount "Order Total."
  5. Write a query to show the retail price of the least expensive book written by Lisa White.

image text in transcribedimage text in transcribedThis is the script to run

ables n steps ORDERS im denei higstate BOOKAUTHOR AUTHOR uantty DcountPUBLISHER the ng tables r each bere must hrough a primary urpose of n kuy FIGURE 1-5 Justlee Books's table structures ater nomalization Figare 1-6 shows a portion of the BOOKS table and the fields it contains after ornalzation. As mentioned, each field represents a characteristie, or attrilute, that's wing collested for an entity. The group of attributes for a specific occurrence (for iutiple, a customer or a booki is called a record. In Oracle 12e, a list of a table's contents ns columns to represent fields and rotes to represent records. These terms are used sterchangeably throughout this textbook, e, instead lisher an a forening oon a foreign ode could tionships the data RS table B0DVBURLD IN 10 MINUTES A DAY 21-JAN-os enon atisonship nd serves 41140933 REVENCE OF MICKEY e1410 BULDING A CAR WITH TOOTHICKS 18-MAR 0 FAMLY LIFE CHILDREN 01THE WOK WAY TO COOK or1243 HOW TO CAT FASTER PIZZA 2147420 SHORTEST FOEMS r bridging 1-SEP-00 the tice As en table keys TO MANAGE THE MANAGER 09 MAY-9 o1-MAY 21 the ary le 1-4 A portion of the B00KS table aher normalzation Overview of Database Concept DROP TABLE employees CASCADE CONSTRAINTS; CREATE TABLE Employees( EMPNC LNAME FNAME JOB HIREDATE DEPTNO MTHSAL BONUS MGR CONSTRAINT employees_empno_PK PRIMARY KEY (EMPNO)); NUMBER (4) VARCHAR2 (20) VARCHAR2 (15) , VARCHAR2 (9), DATE, NUMBER(2) NOT NULL NUMBER (7,2), NUMBER (6,2), NUMBER (4) INSERT INTO employees VALUES NOV-91',10,6000, 3000, NULL); INSERT INTO employees VALUES NOV-98,10,4200,1200,7839) INSERT INTO employees VALUES NOV-95', 20,4900,1500,7839); INSERT INTO employees VALUES NOV-95', 20,4900,1900,7839) INSERT INTO employees VALUES Nov-98", 10, 3700,NULL, 8888) ; COMMIT; (7839, "KING, BEN, GTECH2', "17- (8888, "JONES, 'LARRY, 'MTech2", "17- (7344, "SMITH, 'SAM, 'GTechl', '17- (7355, "POTTS, 'JIM, 'GTechl', '17- (8844, "STUART,SUE, 'MTech1', "17- ables n steps ORDERS im denei higstate BOOKAUTHOR AUTHOR uantty DcountPUBLISHER the ng tables r each bere must hrough a primary urpose of n kuy FIGURE 1-5 Justlee Books's table structures ater nomalization Figare 1-6 shows a portion of the BOOKS table and the fields it contains after ornalzation. As mentioned, each field represents a characteristie, or attrilute, that's wing collested for an entity. The group of attributes for a specific occurrence (for iutiple, a customer or a booki is called a record. In Oracle 12e, a list of a table's contents ns columns to represent fields and rotes to represent records. These terms are used sterchangeably throughout this textbook, e, instead lisher an a forening oon a foreign ode could tionships the data RS table B0DVBURLD IN 10 MINUTES A DAY 21-JAN-os enon atisonship nd serves 41140933 REVENCE OF MICKEY e1410 BULDING A CAR WITH TOOTHICKS 18-MAR 0 FAMLY LIFE CHILDREN 01THE WOK WAY TO COOK or1243 HOW TO CAT FASTER PIZZA 2147420 SHORTEST FOEMS r bridging 1-SEP-00 the tice As en table keys TO MANAGE THE MANAGER 09 MAY-9 o1-MAY 21 the ary le 1-4 A portion of the B00KS table aher normalzation Overview of Database Concept DROP TABLE employees CASCADE CONSTRAINTS; CREATE TABLE Employees( EMPNC LNAME FNAME JOB HIREDATE DEPTNO MTHSAL BONUS MGR CONSTRAINT employees_empno_PK PRIMARY KEY (EMPNO)); NUMBER (4) VARCHAR2 (20) VARCHAR2 (15) , VARCHAR2 (9), DATE, NUMBER(2) NOT NULL NUMBER (7,2), NUMBER (6,2), NUMBER (4) INSERT INTO employees VALUES NOV-91',10,6000, 3000, NULL); INSERT INTO employees VALUES NOV-98,10,4200,1200,7839) INSERT INTO employees VALUES NOV-95', 20,4900,1500,7839); INSERT INTO employees VALUES NOV-95', 20,4900,1900,7839) INSERT INTO employees VALUES Nov-98", 10, 3700,NULL, 8888) ; COMMIT; (7839, "KING, BEN, GTECH2', "17- (8888, "JONES, 'LARRY, 'MTech2", "17- (7344, "SMITH, 'SAM, 'GTechl', '17- (7355, "POTTS, 'JIM, 'GTechl', '17- (8844, "STUART,SUE, 'MTech1', "17

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

Students also viewed these Databases questions