Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Just Query Syntax 1. If you haven't already, perform an inner join on Players and Managers on PlayerID and name it vwPlayerManager . Include all

Just Query Syntax

1. If you haven't already, perform an inner join on Players and Managers on PlayerID and name it vwPlayerManager. Include all fields in Players and all fields in Managers but the PlayerID in Managers (redundant). How many records are there? (2)

2. Look over the data. Change the join to a left join. Look over the data results. How many records are returned with a count? _____________ (2)

3. Explain the difference in the number of records then change the join back to an inner join. (3)

4. Using vwPlayerManagers, create a SELECT to display the managers' first and last names, PlayerID, team, and year. Sort the data first by the team, then by year. (3)

Note: We include the PlayerID to differentiate players with potentially the same name such as Ken Griffey.

5. Using vwPlayerManagers, create a SELECT to display the Manager's Name along with total career wins and total career losses. Order by the last name then first name. (3)

6. Alter the previous statement to include the winning percentage (as a decimal): (3) The formula is Total Wins /Total Games Played You get Total Games Played by adding up wins and losses.

7. Using vwPlayerManager, list the team and how many managers they have had ordered most to fewest. (3)

8. Using vwPlayersBatting, list the city and how many players were born in that city, only for players born in Washington State. Order by city. (3)

9. Using vwPlayersBatting, list the country and the number of players born in that country. Order by Country. (3)

10. Using a vwPlayerSalaries view, provide a list of average salaries, per team, in the year 2005. Order by TeamID. (3)

11. What were the most games ever managed by one manager? (4)

12. Which manager managed the most games? Provide the answer and the SELECTs. (4)

13. What was the largest salary by any player? (2)

14. Who had that salary? (2)

15. Provide the manager name, total career wins, and total career losses for only managers with an overall (career) winning record (total wins > total losses). Remember, we are looking for totals! Keep it simple and use HAVING. (4)

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

Joe Celkos Data And Databases Concepts In Practice

Authors: Joe Celko

1st Edition

1558604324, 978-1558604322

More Books

Students also viewed these Databases questions