Answered step by step
Verified Expert Solution
Question
1 Approved Answer
9 . HINT use a Join statement. I had a query that would show me all of the trips reservations and all of the customers
HINT use a Join statement. I had a query that would show me all of the trips reservations and all of the customers even if the customer did not make a reservation.
HINT use a Join statement. I had a query that showed me all of the trips and all of the guides. Please submit an SQL statement as well as your answer to this question, which trip did not have a guide?
Please help, thank you!
text file below:
Create Schema Colonial;
Use Colonial;
CREATE TABLE GUIDE
GUIDENUM CHAR PRIMARY KEY,
LASTNAME CHAR
FIRSTNAME CHAR
ADDRESS CHAR
CITY CHAR
STATE CHAR
POSTALCODE CHAR
PHONENUM CHAR
HIREDATE DATE ;
CREATE TABLE CUSTOMER
CUSTOMERNUM CHAR PRIMARY KEY,
LASTNAME CHAR NOT NULL,
FIRSTNAME CHAR
ADDRESS CHAR
CITY CHAR
STATE CHAR
POSTALCODE CHAR
PHONE CHAR;
CREATE TABLE RESERVATION
RESERVATIONID CHAR PRIMARY KEY,
TRIPID DECIMAL
TRIPDATE DATE,
NUMPERSONS DECIMAL
TRIPPRICE DECIMAL
OTHERFEES DECIMAL
CUSTOMERNUM CHAR;
CREATE TABLE TRIP
TRIPID DECIMAL PRIMARY KEY,
TRIPNAME CHAR
STARTLOCATION CHAR
STATE CHAR
DISTANCE DECIMAL
MAXGRPSIZE DECIMAL
TYPE CHAR
SEASON CHAR;
CREATE TABLE TRIPGUIDES
TRIPID DECIMAL
GUIDENUM CHAR
PRIMARY KEY TRIPID GUIDENUM;
INSERT INTO GUIDE
VALUES
AM'Abrams','Miles', Quest Ave.'Williamsburg',MA;
INSERT INTO GUIDE
VALUES
BR'Boyers','Rita', Oakton Rd'Jaffrey',NH;
INSERT INTO GUIDE
VALUES
DH'Devon','Harley', Old Ranch Rd'Sunderland',MA;
INSERT INTO GUIDE
VALUES
GZ'Gregory','Zach', Moose Head Rd'Dummer',NH;
INSERT INTO GUIDE
VALUES
KS'Kiley','Susan', Oakton Rd'Jaffrey',NH;
INSERT INTO GUIDE
VALUES
KS'Kelly','Sam', Congaree Ave.'Fraconia',NH;
INSERT INTO GUIDE
VALUES
MR'Marston','Ray', Shenandoah Rd'Springfield',MA;
INSERT INTO GUIDE
VALUES
RH'Rowan','Hal', Heather Rd'Mount Desert',ME;
INSERT INTO GUIDE
VALUES
SL'Stevens','Lori', Riverton Rd'Coventry',VT;
INSERT INTO GUIDE
VALUES
UG'Unser','Glory', Pineview St'Danbury',CT;
INSERT INTO CUSTOMER
VALUES
'Northfold','Liam', Old Mill Rd'Londonderry',NH;
INSERT INTO CUSTOMER
VALUES
'Ocean','Arnold', South St Apt 'Springfield',MA;
INSERT INTO CUSTOMER
VALUES
'Kasuma','Sujata', Main St #'East Hartford',CT;
INSERT INTO CUSTOMER
VALUES
'Goff','Ryan',A South Bend Rd'Lowell',MA;
INSERT INTO CUSTOMER
VALUES
'McLean','Kyle', Lower Ave.'Wolcott',NY;
INSERT INTO CUSTOMER
VALUES
'Morontoia','Joseph', Scholar St'Johnston',RI;
INSERT INTO CUSTOMER
VALUES
'Marchand','Quinn', Cross Rd'Bath',NH;
INSERT INTO CUSTOMER
VALUES
'Rulf','Uschi', Sheep Stop St'Edinboro',PA;
INSERT INTO CUSTOMER
VALUES
'Caron','Jean Luc', Greenfield St'Rome',ME;
INSERT INTO CUSTOMER
VALUES
'Bers','Martha', Granite St'York',NY;
INSERT INTO CUSTOMER
VALUES
'Jones','Laura', Highland Ave.'Somerville',MA;
INSERT INTO CUSTOMER
VALUES
'Vaccari','Adam', Ocean Walk','Ocean CITY',NJ;
INSERT INTO CUSTOMER
VALUES
'Murakami','Iris', Cherry Blossom St'Weymouth',MA;
INSERT INTO CUSTOMER
VALUES
'Chau','Clement', Ark Ledge Ln'Londonderry',VT;
INSERT INTO CUSTOMER
VALUES
'Gernowski','Sadie', Stump Rd
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started