Consider the following relational database for the Super Baseball League. It keeps track of teams in the league, coaches and players on the teams, work experience of the coaches, bats belonging to each team, and which players have played on which teams. Note the following facts about this environment: • Thedatabasekeepstrackofthehistoryofalltheteams that each player has played on and all the players who have played on each team. • The database only keeps track of the current team that a coach works for. • Team number, team name, and player number are each unique attribute across the league. • Coach name is unique only within a team (and we assume that a team cannot have two coaches of the same name). • Serial number (for bats) is unique only within a team. • In the Affiliation table, the Years attribute indicates the number of years that a player played on a team; the batting average is for the years that a player played on a team. Write SQL SELECT commands to answer the following queries. a. Find the names and cities of all of the teams with team numbers greater than 15. List the results alphabetically by team name. b. List all of the coaches whose last names begin with ‘‘D’’ and who have between 5 and 10 years of experi- ence as college coaches (see YEARSEXPERIENCE and EXPERIENCETYPE). c. FindthetotalnumberofyearsofexperienceofCoach Taylor on team number 23.
Consider the following relational
Write SQL SELECT commands to answer the following queries.
a. Find the names and cities of all of the teams with team numbers greater than 15. List the results alphabetically by team name.
b. List all of the coaches whose last names begin with ‘‘D’’ and who have between 5 and 10 years of experi- ence as college coaches (see YEARSEXPERIENCE and EXPERIENCETYPE).
c. FindthetotalnumberofyearsofexperienceofCoach Taylor on team number 23.
d. Find the number of different types of experience that Coach Taylor on team number 23 has.
e. Find the total number of years of experience of each coach on team number 23.
f. How many different manufacturers make bats for the league’s teams?
Trending now
This is a popular solution!
Step by step
Solved in 4 steps