Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: Write SQL codes for each of the questions listed below. Use the ERD on the below to identify the table names and attribute names

Instructions:

Write SQL codes for each of the questions listed below.

Use the ERD on the below to identify the table names and attribute names (make any relevant assumptions about the data types).

Total Value = 10 points

Questions:

1. Show the names and duration of all tours that have the word Ski anywhere in the name. (1 point)

2. For each tour show the tour name and the cost, for all trips that cost between $500 and $1000. (1 point)

3. For each travel group, show the names of all customers in the group, where the group_name has Penn State in it. (1 point)

4. What is the cost of the most expensive tour? (1 point)

5. Prompt the user to enter the tour city (for example Philadelphia) and show the names and costs of all the tours listed for that city. (2 point)

6. Write the code to add two new rows of data to the Sales table. (1 point)

7. Show the names and startdate of all tours that were sold on April 1, 2014. (1 point)

8. Show the first name, last name and phone number of every customer that booked a tour to the city of Harrisburg. (2 point)

image text in transcribed

TourCategories Category Description Tours TourNo Tour Name TourStartDate Duration City State Abbrev Category Cost Sales Sales No SaleDate CustNo TourID States State Name stateAbbreviation Customers custNo FName LName Street City State Zip Phone FirstContact

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

Recommended Textbook for

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

Compare the current team to the ideal team.

Answered: 1 week ago

Question

a. Do team members trust each other?

Answered: 1 week ago

Question

How do members envision the ideal team?

Answered: 1 week ago