Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the SQL statements for the following questions: 10. List the trip IDs and trip names for each pair of trips that have the

I need the SQL statements for the following questions:

10. List the trip IDs and trip names for each pair of trips that have the same start location. (For example, one such pair would be trip ID 2 and trip ID 3, because the start location of both trips is Weathersfield.) The first trip ID listed should be the major sort key, and the second trip ID should be the minor sort key.

11. Find the trip name of all reservations for hiking trips and sort the results by trip name in ascending order.

12. List the number and name of each customer that either lives in the state of New Jersey (NJ), or that currently has a reservation, or both.

13. List the number and name of each customer that lives in the state of New Jersey (NJ) and that currently has a reservation.

14. Find the trip ID and trip name for each trip whose maximum group size is greater than the maximum group size of every trip that has the type Hiking.

15. Find the trip ID and trip name for each trip whose maximum group size is greater than the maximum group size of at least one trip that has the type Biking.

16. Display the trip ID, trip name, and reservation ID for all trips. All trips should be included in the result. For those trips that currently do not have reservations, the reservation ID should be left blank. Order the results by trip ID.

Here are the tables:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

CUSTOMER STATE POSTALCODE 03053 01101 06108 01854 14590 02919 03740 16412 04963 14592 02143 08226 02188 05148 04912 CUSTOMERNUM LASTNAME FIRSTNAME ADDRESS CITY . PHONE Click to Add - - - - 9 Old Mill Rd 2332 South St. Apt 3 132 Main St. #1 164A South Bend Rd. 345 Lower Ave 156 Scholar St. 76 Cross Rd 32 Sheep Stop St. 10 Greenfield St. 65 Granite St. 373 Highland Ave 1282 Ocean W 7 Cherry Blossom St. 18 Ark Ledge Ln. 24 Stump Rd 10 Old Main St. 132 South St. Apt 27 25 Stag Ro 12 Foster St. 51 Fredrick St. 154 Central St. 603-555-7563 413-555-3212 860-555-0703 781-555-8423 585-555-5321 401-555-4848 603-555-0456 814-555-5521 207-555-9643 585-555-0111 857-555-6258 609-555-5231 617-555-6665 802-555-3096 207-555-4507 802-555-3443 603-555-3476 860-555-9876 857-555-5532 585-555-0900 860-555-3234 Northfold Ocean Kasuma Arnold Sujata Ryan SpringfieldMA East Hartford CT Lowell Wolcott Johnstorn 102 103 McLean Morontoia Marchand Rulf Caron Josep Quinn RI ean Luc Rome 110 or Somerville Ocean City Weymouth Laura ones Vaccari Murakami Chau Gernowski Bretton-Borak Siam Hefferson Barnett Busa Peterson Brown alk NJ 116 Clement VT 120 Athens Cambridge Manchester NH Fairfield South Windsor CT Albion Vernon VT 122 Lar Karen Becca Brianne 03101 06824 06074 14411 CT 126 CT

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_2

Step: 3

blur-text-image_3

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions

Question

What is the most obvious evidence that lava extruded under water?

Answered: 1 week ago

Question

Define induction and what are its objectives ?

Answered: 1 week ago

Question

Discuss the techniques of job analysis.

Answered: 1 week ago

Question

How do we do subnetting in IPv6?Explain with a suitable example.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

5. Discuss the role of the Web in career management.

Answered: 1 week ago