BuyFindarrow_forward

A Guide to SQL

9th Edition
Philip J. Pratt
Publisher: Course Technology Ptr
ISBN: 9781111527273
BuyFindarrow_forward

A Guide to SQL

9th Edition
Philip J. Pratt
Publisher: Course Technology Ptr
ISBN: 9781111527273
Chapter 1, Problem 11CAT
Textbook Problem
103 views

For each customer that has more than one reservation, list the customer’s first and last names, the trip name, and the trip type.

Program Plan Intro

SELECT statement:

It is used to retrieve information from the table or database. The syntax for the “SELECT” statement is given below:

Syntax:

SELECT * FROM table_Name;

GROUP BY Clause:

The GROUP BY clause is used to group the result of a SELECT statement done on a table where the tuple values are similar for more than one column

Syntax:

SELECT expression1, expression2, expression_n, aggregate_function (expression) FROM table_name WHERE conditions GROUP BY expression1, expression2, expression_n;

HAVING clause:

“HAVING” clause is used to limit groups “HAVING” clause,  used to overcome “WHERE” clause because, “HAVING” clause uses aggregate functions.

Syntax:

SELECT column_Name1, column_Name2 FROM table_name WHERE [conditions] GROUP BY column_name(s) HAVING [conditions] ORDER BY column_name;

Explanation of Solution

Query to list the customer and trip details:

SELECT C.FIRST_NAME, C.LAST_NAME, T.TRIP_NAME, T.TYPE FROM CUSTOMER C, TRIP T, RESERVATION R WHERE C.CUSTOMER_NUM=R.CUSTOMER_NUM AND R.TRIP_ID=T.TRIP_ID AND C...

Still sussing out bartleby?

Check out a sample textbook solution.

See a sample solution

The Solution to Your Study Problems

Bartleby provides explanations to thousands of textbook problems written by our experts, many with advanced degrees!

Get Started

Chapter 1 Solutions

A Guide to SQL
Show all chapter solutions
add
Ch. 1 - TAL Distributors needs to be able to contact...Ch. 1 - List the first and last name of each guide that...Ch. 1 - List the trip name of each trip that has a maximum...Ch. 1 - List the trip ID and trip name of each trip that...Ch. 1 - List the trip ID and trip name of each trip that...Ch. 1 - List the trip ID and trip name of each trip that...Ch. 1 - How many trips have the type Hiking?Ch. 1 - List the trip name of each trip that has Hal Rowan...Ch. 1 - Find the name of each trip containing the word...Ch. 1 - List the first and last name of each guide who...Ch. 1 - How many reservations are for trips that occur...Ch. 1 - For each customer that has more than one...Ch. 1 - List the last name of each customer that has a...Ch. 1 - How many reservations have a trip price that is...Ch. 1 - Currently, trip cost is determined by the number...Ch. 1 - List the owner number, last name, and first name...Ch. 1 - List the last name and first name of every owner...Ch. 1 - List the condo ID number for each condo that is...Ch. 1 - List the last name, first name, and city of every...Ch. 1 - List the last name, first name, and city of every...Ch. 1 - List the unit number of each condo at the Solmaris...Ch. 1 - How many condos have two bedrooms and two...Ch. 1 - How many owners live in Florida (FL), Georgia...Ch. 1 - List the owners last and first names and the unit...Ch. 1 - List the condo ID number and square footage for...Ch. 1 - List the condo ID number and location name for all...Ch. 1 - What is the average condo fee for all...Ch. 1 - The Solmaris database does not include a column...

Additional Engineering Textbook Solutions

Find more solutions based on key concepts
Show solutions add
List and describe the three major steps in executing the project plan.

Principles of Information Security (MindTap Course List)

Small particles of________ alloys are flammable.

Precision Machining Technology (MindTap Course List)

List five sports-related products that you think should be designed to make playing sports more fun.

Engineering Fundamentals: An Introduction to Engineering (MindTap Course List)

What is InfoSec governance?

Management Of Information Security

How would a specific date, such as April 27, 2015, be represented as an absolute date?

Systems Analysis and Design (Shelly Cashman Series) (MindTap Course List)

Describe how personal computers often are differentiated.

Enhanced Discovering Computers 2017 (Shelly Cashman Series) (MindTap Course List)

If your motherboard supports ECC DDR3 memory, can you substitute non-ECC DDR3 memory?

A+ Guide to Hardware (Standalone Book) (MindTap Course List)

What effect does the root opening or root gap have on a butt joint?

Welding: Principles and Applications (MindTap Course List)