Question

Using the data below from the books.sql file please answer the following: Use a search pattern...

Using the data below from the books.sql file please answer the following:

Use a search pattern condition to display the order# and the orderdate of those orders placed by customers whose last name ends with the letter “H” or “S”. Please execute your SQL statement in Oracle SQL plus and tell me how many rows are selected.

DROP TABLE CUSTOMERS;
DROP TABLE ORDERS;
DROP TABLE PUBLISHER;
DROP TABLE AUTHOR;
DROP TABLE BOOKS;
DROP TABLE ORDERITEMS;
DROP TABLE BOOKAUTHOR;
DROP TABLE PROMOTION;

Create table Customers
(Customer# NUMBER(4) PRIMARY KEY,
LastName VARCHAR2(10),
FirstName VARCHAR2(10),
Address VARCHAR2(20),
City VARCHAR2(12),
State VARCHAR2(2),
Zip VARCHAR2(5),
Referred NUMBER(4));

INSERT INTO CUSTOMERS
VALUES (1001, 'MORALES', 'BONITA', 'P.O. BOX 651', 'EASTPOINT', 'FL', '32328', NULL);
INSERT INTO CUSTOMERS
VALUES (1002, 'THOMPSON', 'RYAN', 'P.O. BOX 9835', 'SANTA MONICA', 'CA', '90404', NULL);
INSERT INTO CUSTOMERS
VALUES (1003, 'SMITH', 'LEILA', 'P.O. BOX 66', 'TALLAHASSEE', 'FL', '32306', NULL);
INSERT INTO CUSTOMERS
VALUES (1004, 'PIERSON', 'THOMAS', '69821 SOUTH AVENUE', 'BOISE', 'ID', '83707', NULL);
INSERT INTO CUSTOMERS
VALUES (1005, 'GIRARD', 'CINDY', 'P.O. BOX 851', 'SEATTLE', 'WA', '98115', NULL);
INSERT INTO CUSTOMERS
VALUES (1006, 'CRUZ', 'MESHIA', '82 DIRT ROAD', 'ALBANY', 'NY', '12211', NULL);
INSERT INTO CUSTOMERS
VALUES (1007, 'GIANA', 'TAMMY', '9153 MAIN STREET', 'AUSTIN', 'TX', '78710', 1003);
INSERT INTO CUSTOMERS
VALUES (1008, 'JONES', 'KENNETH', 'P.O. BOX 137', 'CHEYENNE', 'WY', '82003', NULL);
INSERT INTO CUSTOMERS
VALUES (1009, 'PEREZ', 'JORGE', 'P.O. BOX 8564', 'BURBANK', 'CA', '91510', 1003);
INSERT INTO CUSTOMERS
VALUES (1010, 'LUCAS', 'JAKE', '114 EAST SAVANNAH', 'ATLANTA', 'GA', '30314', NULL);
INSERT INTO CUSTOMERS
VALUES (1011, 'MCGOVERN', 'REESE', 'P.O. BOX 18', 'CHICAGO', 'IL', '60606', NULL);
INSERT INTO CUSTOMERS
VALUES (1012, 'MCKENZIE', 'WILLIAM', 'P.O. BOX 971', 'BOSTON', 'MA', '02110', NULL);
INSERT INTO CUSTOMERS
VALUES (1013, 'NGUYEN', 'NICHOLAS', '357 WHITE EAGLE AVE.', 'CLERMONT', 'FL', '34711', 1006);
INSERT INTO CUSTOMERS
VALUES (1014, 'LEE', 'JASMINE', 'P.O. BOX 2947', 'CODY', 'WY', '82414', NULL);
INSERT INTO CUSTOMERS
VALUES (1015, 'SCHELL', 'STEVE', 'P.O. BOX 677', 'MIAMI', 'FL', '33111', NULL);
INSERT INTO CUSTOMERS
VALUES (1016, 'DAUM', 'MICHELL', '9851231 LONG ROAD', 'BURBANK', 'CA', '91508', 1010);
INSERT INTO CUSTOMERS
VALUES (1017, 'NELSON', 'BECCA', 'P.O. BOX 563', 'KALMAZOO', 'MI', '49006', NULL);
INSERT INTO CUSTOMERS
VALUES (1018, 'MONTIASA', 'GREG', '1008 GRAND AVENUE', 'MACON', 'GA', '31206', NULL);
INSERT INTO CUSTOMERS
VALUES (1019, 'SMITH', 'JENNIFER', 'P.O. BOX 1151', 'MORRISTOWN', 'NJ', '07962', 1003);
INSERT INTO CUSTOMERS
VALUES (1020, 'FALAH', 'KENNETH', 'P.O. BOX 335', 'TRENTON', 'NJ', '08607', NULL);

Create Table Orders
(Order# NUMBER(4) PRIMARY KEY,
Customer# NUMBER(4),
OrderDate DATE,
ShipDate DATE,
ShipStreet VARCHAR2(18),
ShipCity VARCHAR2(15),
ShipState VARCHAR2(2),
ShipZip VARCHAR2(5));

INSERT INTO ORDERS
VALUES (1000,1005,'31-MAR-05','02-APR-05','1201 ORANGE AVE', 'SEATTLE', 'WA', '98114');
INSERT INTO ORDERS
VALUES (1001,1010,'31-MAR-05','01-APR-05', '114 EAST SAVANNAH', 'ATLANTA', 'GA', '30314');
INSERT INTO ORDERS
VALUES (1002,1011,'31-MAR-05','01-APR-05','58 TILA CIRCLE', 'CHICAGO', 'IL', '60605');
INSERT INTO ORDERS
VALUES (1003,1001,'01-APR-05','01-APR-05','958 MAGNOLIA LANE', 'EASTPOINT', 'FL', '32328');
INSERT INTO ORDERS
VALUES (1004,1020,'01-APR-05','05-APR-05','561 ROUNDABOUT WAY', 'TRENTON', 'NJ', '08601');
INSERT INTO ORDERS
VALUES (1005,1018,'01-APR-05','02-APR-05', '1008 GRAND AVENUE', 'MACON', 'GA', '31206');
INSERT INTO ORDERS
VALUES (1006,1003,'01-APR-05','02-APR-05','558A CAPITOL HWY.', 'TALLAHASSEE', 'FL', '32307');
INSERT INTO ORDERS
VALUES (1007,1007,'02-APR-05','04-APR-05', '9153 MAIN STREET', 'AUSTIN', 'TX', '78710');
INSERT INTO ORDERS
VALUES (1008,1004,'02-APR-05','03-APR-05', '69821 SOUTH AVENUE', 'BOISE', 'ID', '83707');
INSERT INTO ORDERS
VALUES (1009,1005,'03-APR-05','05-APR-05','9 LIGHTENING RD.', 'SEATTLE', 'WA', '98110');
INSERT INTO ORDERS
VALUES (1010,1019,'03-APR-05','04-APR-05','384 WRONG WAY HOME', 'MORRISTOWN', 'NJ', '07960');
INSERT INTO ORDERS
VALUES (1011,1010,'03-APR-05','05-APR-05', '102 WEST LAFAYETTE', 'ATLANTA', 'GA', '30311');
INSERT INTO ORDERS
VALUES (1012,1017,'03-APR-05',NULL,'1295 WINDY AVENUE', 'KALMAZOO', 'MI', '49002');
INSERT INTO ORDERS
VALUES (1013,1014,'03-APR-05','04-APR-05','7618 MOUNTAIN RD.', 'CODY', 'WY', '82414');
INSERT INTO ORDERS
VALUES (1014,1007,'04-APR-05','05-APR-05', '9153 MAIN STREET', 'AUSTIN', 'TX', '78710');
INSERT INTO ORDERS
VALUES (1015,1020,'04-APR-05',NULL,'557 GLITTER ST.', 'TRENTON', 'NJ', '08606');
INSERT INTO ORDERS
VALUES (1016,1003,'04-APR-05',NULL,'9901 SEMINOLE WAY', 'TALLAHASSEE', 'FL', '32307');
INSERT INTO ORDERS
VALUES (1017,1015,'04-APR-05','05-APR-05','887 HOT ASPHALT ST', 'MIAMI', 'FL', '33112');
INSERT INTO ORDERS
VALUES (1018,1001,'05-APR-05',NULL,'95812 HIGHWAY 98', 'EASTPOINT', 'FL', '32328');
INSERT INTO ORDERS
VALUES (1019,1018,'05-APR-05',NULL, '1008 GRAND AVENUE', 'MACON', 'GA', '31206');
INSERT INTO ORDERS
VALUES (1020,1008,'05-APR-05',NULL,'195 JAMISON LANE', 'CHEYENNE', 'WY', '82003');

Create Table Publisher
(PubID NUMBER(2) PRIMARY KEY,
Name VarCHAR2(23),
Contact VARCHAR2(15),
Phone VARCHAR2(12));

INSERT INTO PUBLISHER
VALUES(1,'PRINTING IS US','TOMMIE SEYMOUR','000-714-8321');
INSERT INTO PUBLISHER
VALUES(2,'PUBLISH OUR WAY','JANE TOMLIN','010-410-0010');
INSERT INTO PUBLISHER
VALUES(3,'AMERICAN PUBLISHING','DAVID DAVIDSON','800-555-1211');
INSERT INTO PUBLISHER
VALUES(4,'READING MATERIALS INC.','RENEE SMITH','800-555-9743');
INSERT INTO PUBLISHER
VALUES(5,'REED-N-RITE','SEBASTIAN JONES','800-555-8284');

Create Table Author
(AuthorID Varchar2(4) PRIMARY KEY,
Lname VARCHAR2(10),
Fname VARCHAR2(10));

INSERT INTO AUTHOR
VALUES ('S100','SMITH', 'SAM');
INSERT INTO AUTHOR
VALUES ('J100','JONES','JANICE');
INSERT INTO AUTHOR
VALUES ('A100','AUSTIN','JAMES');
INSERT INTO AUTHOR
VALUES ('M100','MARTINEZ','SHEILA');
INSERT INTO AUTHOR
VALUES ('K100','KZOCHSKY','TAMARA');
INSERT INTO AUTHOR
VALUES ('P100','PORTER','LISA');
INSERT INTO AUTHOR
VALUES ('A105','ADAMS','JUAN');
INSERT INTO AUTHOR
VALUES ('B100','BAKER','JACK');
INSERT INTO AUTHOR
VALUES ('P105','PETERSON','TINA');
INSERT INTO AUTHOR
VALUES ('W100','WHITE','WILLIAM');
INSERT INTO AUTHOR
VALUES ('W105','WHITE','LISA');
INSERT INTO AUTHOR
VALUES ('R100','ROBINSON','ROBERT');
INSERT INTO AUTHOR
VALUES ('F100','FIELDS','OSCAR');
INSERT INTO AUTHOR
VALUES ('W110','WILKINSON','ANTHONY');

Create table Books
(ISBN VARCHAR2(10) PRIMARY KEY,
Title VARCHAR2(30),
PubDate DATE,
PubID NUMBER (2),
Cost NUMBER (5,2),
Retail NUMBER (5,2),
Category VARCHAR2(12));

INSERT INTO BOOKS
VALUES ('1059831198','BODYBUILD IN 10 MINUTES A DAY','21-JAN-01',4,18.75,30.95, 'FITNESS');
INSERT INTO BOOKS
VALUES ('0401140733','REVENGE OF MICKEY','14-DEC-01',1,14.20,22.00, 'FAMILY LIFE');
INSERT INTO BOOKS
VALUES ('4981341710','BUILDING A CAR WITH TOOTHPICKS','18-MAR-02',2,37.80,59.95, 'CHILDREN');
INSERT INTO BOOKS
VALUES ('8843172113','DATABASE IMPLEMENTATION','04-JUN-99',3,31.40,55.95, 'COMPUTER');
INSERT INTO BOOKS
VALUES ('3437212490','COOKING WITH MUSHROOMS','28-FEB-00',4,12.50,19.95, 'COOKING');
INSERT INTO BOOKS
VALUES ('3957136468','HOLY GRAIL OF ORACLE','31-DEC-01',3,47.25,75.95, 'COMPUTER');
INSERT INTO BOOKS
VALUES ('1915762492','HANDCRANKED COMPUTERS','21-JAN-01',3,21.80,25.00, 'COMPUTER');
INSERT INTO BOOKS
VALUES ('9959789321','E-BUSINESS THE EASY WAY','01-MAR-02',2,37.90,54.50, 'COMPUTER');
INSERT INTO BOOKS
VALUES ('2491748320','PAINLESS CHILD-REARING','17-JUL-00',5,48.00,89.95, 'FAMILY LIFE');
INSERT INTO BOOKS
VALUES ('0299282519','THE WOK WAY TO COOK','11-SEP-00',4,19.00,28.75, 'COOKING');
INSERT INTO BOOKS
VALUES ('8117949391','BIG BEAR AND LITTLE DOVE','08-NOV-01',5,5.32,8.95, 'CHILDREN');
INSERT INTO BOOKS
VALUES ('0132149871','HOW TO GET FASTER PIZZA','11-NOV-02',4,17.85,29.95, 'SELF HELP');
INSERT INTO BOOKS
VALUES ('9247381001','HOW TO MANAGE THE MANAGER','09-MAY-99',1,15.40,31.95, 'BUSINESS');
INSERT INTO BOOKS
VALUES ('2147428890','SHORTEST POEMS','01-MAY-01',5,21.85,39.95, 'LITERATURE');

CREATE TABLE ORDERITEMS
(ORDER# NUMBER(4) NOT NULL,
ITEM# NUMBER(2) NOT NULL,
ISBN VARCHAR2(10),
QUANTITY NUMBER(3) );

INSERT INTO ORDERITEMS
VALUES (1000,1,'3437212490',1);
INSERT INTO ORDERITEMS
VALUES (1001,1,'9247381001',1);
INSERT INTO ORDERITEMS
VALUES (1001,2,'2491748320',1);
INSERT INTO ORDERITEMS
VALUES (1002,1,'8843172113',2);
INSERT INTO ORDERITEMS
VALUES (1003,1,'8843172113',1);
INSERT INTO ORDERITEMS
VALUES (1003,2,'1059831198',1);
INSERT INTO ORDERITEMS
VALUES (1003,3,'3437212490',1);
INSERT INTO ORDERITEMS
VALUES (1004,1,'2491748320',2);
INSERT INTO ORDERITEMS
VALUES (1005,1,'2147428890',1);
INSERT INTO ORDERITEMS
VALUES (1006,1,'9959789321',1);
INSERT INTO ORDERITEMS
VALUES (1007,1,'3957136468',3);
INSERT INTO ORDERITEMS
VALUES (1007,2,'9959789321',1);
INSERT INTO ORDERITEMS
VALUES (1007,3,'8117949391',1);
INSERT INTO ORDERITEMS
VALUES (1007,4,'8843172113',1);
INSERT INTO ORDERITEMS
VALUES (1008,1,'3437212490',2);
INSERT INTO ORDERITEMS
VALUES (1009,1,'3437212490',1);
INSERT INTO ORDERITEMS
VALUES (1009,2,'0401140733',1);
INSERT INTO ORDERITEMS
VALUES (1010,1,'8843172113',1);
INSERT INTO ORDERITEMS
VALUES (1011,1,'2491748320',1);
INSERT INTO ORDERITEMS
VALUES (1012,1,'8117949391',1);
INSERT INTO ORDERITEMS
VALUES (1012,2,'1915762492',2);
INSERT INTO ORDERITEMS
VALUES (1012,3,'2491748320',1);
INSERT INTO ORDERITEMS
VALUES (1012,4,'0401140733',1);
INSERT INTO ORDERITEMS
VALUES (1013,1,'8843172113',1);
INSERT INTO ORDERITEMS
VALUES (1014,1,'0401140733',2);
INSERT INTO ORDERITEMS
VALUES (1015,1,'3437212490',1);
INSERT INTO ORDERITEMS
VALUES (1016,1,'2491748320',1);
INSERT INTO ORDERITEMS
VALUES (1017,1,'8117949391',2);
INSERT INTO ORDERITEMS
VALUES (1018,1,'3437212490',1);
INSERT INTO ORDERITEMS
VALUES (1018,2,'8843172113',1);
INSERT INTO ORDERITEMS
VALUES (1019,1,'0401140733',1);
INSERT INTO ORDERITEMS
VALUES (1020,1,'3437212490',1);

CREATE TABLE BOOKAUTHOR
(ISBN VARCHAR2(10),
AUTHORid VARCHAR2(4),
CONSTRAINT bookauthor_pk PRIMARY KEY (isbn,authorid));

INSERT INTO BOOKAUTHOR
VALUES ('1059831198','S100');
INSERT INTO BOOKAUTHOR
VALUES ('1059831198','P100');
INSERT INTO BOOKAUTHOR
VALUES ('0401140733','J100');
INSERT INTO BOOKAUTHOR
VALUES ('4981341710','K100');
INSERT INTO BOOKAUTHOR
VALUES ('8843172113','P105');
INSERT INTO BOOKAUTHOR
VALUES ('8843172113','A100');
INSERT INTO BOOKAUTHOR
VALUES ('8843172113','A105');
INSERT INTO BOOKAUTHOR
VALUES ('3437212490','B100');
INSERT INTO BOOKAUTHOR
VALUES ('3957136468','A100');
INSERT INTO BOOKAUTHOR
VALUES ('1915762492','W100');
INSERT INTO BOOKAUTHOR
VALUES ('1915762492','W105');
INSERT INTO BOOKAUTHOR
VALUES ('9959789321','J100');
INSERT INTO BOOKAUTHOR
VALUES ('2491748320','R100');
INSERT INTO BOOKAUTHOR
VALUES ('2491748320','F100');
INSERT INTO BOOKAUTHOR
VALUES ('2491748320','B100');
INSERT INTO BOOKAUTHOR
VALUES ('0299282519','S100');
INSERT INTO BOOKAUTHOR
VALUES ('8117949391','R100');
INSERT INTO BOOKAUTHOR
VALUES ('0132149871','S100');
INSERT INTO BOOKAUTHOR
VALUES ('9247381001','W100');
INSERT INTO BOOKAUTHOR
VALUES ('2147428890','W105');

create table promotion
(gift varchar2(15),
minretail number(5,2),
maxretail number(5,2));

insert into promotion
values ('BOOKMARKER', 0, 12);

insert into promotion
values ('BOOK LABELS', 12.01, 25);

insert into promotion
values ('BOOK COVER', 25.01, 56);

insert into promotion
values ('FREE SHIPPING', 56.01, 999.99);

Commit;

Homework Answers

Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

This demonstration is using Oracle Live SQL.

SQL Query :

select order#,orderdate,LastName from orders,customers
where orders.order#=customers.customer# and
regexp_like (lastname,'*(H|S)$');

Screen in Oracle Live SQL :

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Determine the profit of each book sold to Jake Lucas. Sort the results by the date...
Determine the profit of each book sold to Jake Lucas. Sort the results by the date of the order. If more than one book was ordered, have the results sorted by the profit amount in descending order. This is the Database below for the question above using Oracle on iacademy3.oracle.com DROP TABLE CUSTOMERS; DROP TABLE ORDERS; DROP TABLE PUBLISHER; DROP TABLE AUTHOR; DROP TABLE BOOKS; DROP TABLE ORDERITEMS; DROP TABLE BOOKAUTHOR; DROP TABLE PROMOTION; Create table Customers (Customer# NUMBER(4) PRIMARY...
CREATE TABLE Orders (Order# NUMBER(4), Customer# NUMBER(4), OrderDate DATE NOT NULL, ShipDate DATE, ShipStreet VARCHAR2(18), ShipCity...
CREATE TABLE Orders (Order# NUMBER(4), Customer# NUMBER(4), OrderDate DATE NOT NULL, ShipDate DATE, ShipStreet VARCHAR2(18), ShipCity VARCHAR2(15), ShipState VARCHAR2(2), ShipZip VARCHAR2(5), ShipCost NUMBER(4,2), CONSTRAINT orders_order#_pk PRIMARY KEY(order#), CONSTRAINT orders_customer#_fk FOREIGN KEY (customer#) REFERENCES customers(customer#)); INSERT INTO ORDERS VALUES (1000,1005,TO_DATE('31-MAR-09','DD-MON-YY'),TO_DATE('02-APR-09','DD-MON-YY'),'1201 ORANGE AVE', 'SEATTLE', 'WA', '98114' , 2.00); INSERT INTO ORDERS VALUES (1001,1010,TO_DATE('31-MAR-09','DD-MON-YY'),TO_DATE('01-APR-09','DD-MON-YY'), '114 EAST SAVANNAH', 'ATLANTA', 'GA', '30314', 3.00); INSERT INTO ORDERS VALUES (1002,1011,TO_DATE('31-MAR-09','DD-MON-YY'),TO_DATE('01-APR-09','DD-MON-YY'),'58 TILA CIRCLE', 'CHICAGO', 'IL', '60605', 3.00); INSERT INTO ORDERS VALUES (1003,1001,TO_DATE('01-APR-09','DD-MON-YY'),TO_DATE('01-APR-09','DD-MON-YY'),'958 MAGNOLIA LANE', 'EASTPOINT', 'FL', '32328', 4.00);...
Use the data below to answer this questions. a.) Generate a scatter of the data b....
Use the data below to answer this questions. a.) Generate a scatter of the data b. ) Report the monthly averages (January for all years, February for all years etc.) c.) Is there seasonality? Is there a trend? d.) How can you forecast the value for March 2020? Generate that forecast. e.) (Not technical) This forecast will for sure be wrong. Why? Reference period Employment 3 Persons Jan-01 1,879.50 Feb-01 1,901.00 Mar-01 1,925.30 Apr-01 1,914.60 May-01 1,961.50 Jun-01 1,960.60 Jul-01...
Use the data below to answer this questions. Period Employment Jan-01 1,879.50 Feb-01 1,901.00 Mar-01 1,925.30...
Use the data below to answer this questions. Period Employment Jan-01 1,879.50 Feb-01 1,901.00 Mar-01 1,925.30 Apr-01 1,914.60 May-01 1,961.50 Jun-01 1,960.60 Jul-01 1,953.40 Aug-01 1,940.20 Sep-01 1,928.00 Oct-01 1,909.20 Nov-01 1,896.40 Dec-01 1,881.40 Jan-02 1,880.20 Feb-02 1,884.00 Mar-02 1,902.60 Apr-02 1,913.40 May-02 1,937.40 Jun-02 1,990.90 Jul-02 1,994.80 Aug-02 2,013.10 Sep-02 2,002.30 Oct-02 1,982.50 Nov-02 1,969.00 Dec-02 1,959.20 Jan-03 1,928.20 Feb-03 1,952.40 Mar-03 1,980.40 Apr-03 1,972.00 May-03 1,987.80 Jun-03 2,018.70 Jul-03 2,027.80 Aug-03 2,030.20 Sep-03 2,012.20 Oct-03 2,032.30 Nov-03 2,008.30...
SQL Write the queries necessary to obtain the required information 1) Use sub query and “in”...
SQL Write the queries necessary to obtain the required information 1) Use sub query and “in” keyword to print the salesreps (ids) who have taken order for the companies ‘Zetacorp’ or ‘JCP Inc.’ . Duplicate rows are not allowed 2) Use sub query to find the id and the name of every sales rep that represents at least one customer with a credit limit of greater than $5000. 3) Use sub query and keyword “exists” to list the id and...
Please create the queries listed below using the books database under question 4. Thanks for the...
Please create the queries listed below using the books database under question 4. Thanks for the help 1. List the number of books, the minimum price, maximum price, and average sales of history books. The format of output is: Number Min Price Max Price Average Sale 2. List the number of books and the average number of pages published by pub_id P01. 3. List the number of books and the total sales of the books with price greater than $15....
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following tables: VENDOR, PRODUCT, CUSTOMER, INVOICE, LINE EMPLOYEE and loads the default data rows */ set echo on; set serveroutput on; select systimestamp from dual; show user; ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'; DROP TABLE LINE CASCADE CONSTRAINTS; DROP TABLE INVOICE CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE VENDOR CASCADE CONSTRAINTS; DROP TABLE EMPLOYEE CASCADE CONSTRAINTS; CREATE TABLE...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following...
/* myCompany.SQL Introduction to SQL Script file for ORACLE DBMS This script file creates the following tables: VENDOR, PRODUCT, CUSTOMER, INVOICE, LINE EMPLOYEE and loads the default data rows */ set echo on; set serveroutput on; select systimestamp from dual; show user; ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY'; DROP TABLE LINE CASCADE CONSTRAINTS; DROP TABLE INVOICE CASCADE CONSTRAINTS; DROP TABLE CUSTOMER CASCADE CONSTRAINTS; DROP TABLE PRODUCT CASCADE CONSTRAINTS; DROP TABLE VENDOR CASCADE CONSTRAINTS; DROP TABLE EMPLOYEE CASCADE CONSTRAINTS; CREATE TABLE...
Use any method that you want in order to solve the problems (Subqueries, inner-join/equi-join. outer join,...
Use any method that you want in order to solve the problems (Subqueries, inner-join/equi-join. outer join, EXISTS) Design the following queries. using mySQL 1. List the title_name and book type of the books that are published earlier than the earliest biography book 2. List the title_name and book type of the books published by 'Abatis Publishers' 3. Find the name(s) of the publisher(s) that have not published any book 4. Find the name(s) of the publisher(s) who have published the...
Aggregation 1. List the following about history books: number of history books, the minimum price, maximum...
Aggregation 1. List the following about history books: number of history books, the minimum price, maximum price, and average sales. The format of output is: "Number" "Min Price" "Max Price" "Average Sale" 2. List the number of books and the average number of pages published by pub_id 01. 3. For each book type, list the the number of books and the average price. Sort the results by the number of books Functions 4. List the name(s) of the publisher(s) that...