Question: The tables and relational model shown below are from a sport club program allowing customers to have periodic personal training with a coach for a

The tables and relational model shown below areThe tables and relational model shown below areThe tables and relational model shown below are

The tables and relational model shown below are from a sport club program allowing customers to have periodic personal training with a coach for a specific discipline. Information about coaches include their hired year, specialty discipline and their contract type which can be full or part time. Customers name, age and membership type is recorded in the database. Memberships allow customers to take a variety of classes. Three types of membership are available : 3-Months, 6-Months and Annual. Decide not to have a membership and just pay a class fee for each class session. Those customers are registered as having a Daily membership Information about each class session is recorded in the database, including the class name, its location and its duration. Duration are in minutes. The class name has a standard format which include the level of the class (Beginner, Intermediate or Advanced) followed by the name of the discipline taught. It is possible for customers to have their classes at the sport club facilities, registered as In-house, or at a remote location, registered as Outside. Coach CoachiD Specialty HiredYear Contract 100 Gymnastics 2016 Full time 101 Swimming 2019 Part time 102 Swimming 2015 Full time 103 Tennis 2014 Full time 104 Boxing 2020 Part time Customer CustomerID CustName Age Membership 3001 Pixie Wiggins 22 3-Months 3002 Jorgie Sellers 31 6-Months Johnnie Forrest 3003 34 Annual 3004 Taylah Ayers 27 3-Months 3005 Sharna George 26 Annual Vienna Harrell 3006 30 3-Months Gurleen Barr 3007 25 Daily 3008 Aria Villalobos 30 6-Months Classes ClassID CoachiD Customer ClassName Location Duration SW0451 101 3003 Intermediate Swimming In-house 60 T145 103 3001 Beginner Tennis Outside 45 T101 103 3003 Intermediate Tennis Outside 60 B145 104 3007 Beginner Boxing In-house 30 GYM145 100 3002 Beginner Gymnastics In-house 30 SW0123 102 3002 Advanced Swimming In-house 60 GYM147 100 3008 Advanced Gymnastics Outside 90 Relational Model Coach CoachiD Specialty Hired Year Contract Classes ClassID CoachiD Customers ClassName Location Duration Customer CustomerID CustName Age Membership Question 3 (8 pts, 2 pts each) Write the SQL queries to answer the following questions: Note that your SQL code should work for any possible data, not just the one in the tables above. a. List the ID number of all coaches specialized in Boxing. b. List all the customer information for customers having either a 3-months or 6 months membership and being older than 30 years old (included). Your result should be ordered from the youngest to the oldest customer. c. List the class ID and coach ID of all intermediate classes. d. Using a single query, list the class ID and class name of all in-house classes lasting less than 30 minutes and all outside classes lasting more than 50 minutes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!