STAT 29000
Project 9
due Friday, November 14, at 8:30 AM


Put all of your solutions into one text file for your group. The file should be called, for instance:
p09g1.R for project 9, group 1, and should be stored in the folder: /proj/gpproj14/p09g1/
   Group 1 consists of: omalleyb,cringwa,ffranci,rcrutkow
p09g2.R for project 9, group 2, and should be stored in the folder: /proj/gpproj14/p09g2/
   Group 2 consists of: cdesanti,malek,boydp,lyoke
p09g3.R for project 9, group 3, and should be stored in the folder: /proj/gpproj14/p09g3/
   Group 3 consists of: reno0,zhan1460,vincentc,gallaghp
p09g4.R for project 9, group 4, and should be stored in the folder: /proj/gpproj14/p09g4/
   Group 4 consists of: john1209,marti748,philliw,kidd6
p09g5.R for project 9, group 5, and should be stored in the folder: /proj/gpproj14/p09g5/
   Group 5 consists of: peter188,avorhies,enorlin,fu82


The code found in the Week 11 examples should be helpful in this problem set.

1a. Find the first and last names of all the players who attended Purdue University.
1b. Same question, but add the years (starting and ending years) for which each of these people played for Purdue.
1c. Same question, but now include 1 row for each year that the player was in the Major Leagues. Add a column for the Major League year and a column for home runs that year.

2a. Find the first and last names of all the players who attended college anywhere in Indiana.
2b. Same question, but add the years (starting and ending years) for which each of these people played in their universities in Indiana.
2c. Same question, but now include 1 row for each year that the player was in the Major Leagues. Add a column for the Major League year and a column for home runs that year.

3a. Find all teams that won 105 or more games in a season. List the year, the team's full name, and the number of wins in that season.
3b. Same question, but now include the first and last name of the manager for the team.

4a. Find all the years in which the Chicago Cubs were the League Champions.
4b. Same question, but now include the first and last name of the manager for the team.

5a. Find all players who stole 100 or more bases. For each such player, list the player's first name, last name, the number of bases stolen, and the year.
5b. Same question, but now include the full name of the team that player played on, during the year of the achievement.

6a. Find the first and last names of all players inducted into the Hall of Fame since 2008 (including 2008 itself, and all years since then). Be sure to list the year of induction.
6b. Same question, but now sort the results of the query by year.
6c. Same question, but now give just the counts of the number of players inducted per year. Your results should have 1 column with the year and 1 column with the counts of how many players were inducted that year.

7a. For each pitcher who had 20 or more wins, list the player's first name, last name, number of wins, and the relevant year.
7b. Same question, but now give just the counts of the number of players per year. Your results should have 1 column with the year and 1 column with the counts of how many players had 20 of more wins that year.

8a. The "40-40" club is a name commonly given to the group of all players who stole 40 or more bases and hit 40 or more home runs in the same year. For each member of the 40-40 club, list the player's first name, last name, the relevant year for the achievement, the number of bases stolen in that year, the number of home runs in that year, and the full name of the player's team.
8b. Same question, but now for the 30-30 club.
8c. Same question, for the 30-30 club, but now ignore the names of the players and their specific numbers of home runs and stolen bases, and ignore the years too. Instead, give the summary totals, by team, of how many times the team has had a 30-30 player (with possible repetitions). For example, the Chicago Cubs would have count "2", since Sammy Sosa achieved this feat twice in his career, but no other Chicago Cub achieved this feat.

9a. Find all players who earned 20 million dollars or more in a season. For each such occurrence, list the player's first name, last name, the year, the salary, the teamID, and the Team's full name.
9b. Give a table that has a "Year" column, and a "Total Salary" column, and a "Team" column.
9c. Sort the table in the previous question according to the total salary column.

10a. Consider the total number of saves by pitchers during their entire careers. A few pitchers had 300 or more saves during their careers. Make a list of all such pitchers. For each such pitcher, give his first name, last name, and the total number of saves that the pitcher had during his career.
10b. Same question, but instead of finding pitchers with 300 or more saves, find pitchers with 2000 or more strikeouts during their careers.