Reference no: EM132284154
Homework -
You must use SQL to solve all exercises in this Homework Assignment.
1. You will be working with the SAS data file employee_roster which contains many variables regarding the employees of the Orion Corporation.
a. Print the descriptor portion of the SAS data file. (Include results in the HW Report. The result will actually print into the SAS Log, so you'll need to copy and paste it to the RTF file.)
b. Read in the SAS data file and create a SAS data file called top_earners_NetID that contains all Orion employees who make over $70,000. Also change the labels of Job_Title to "Position" and Salary to "Yearly Salary".
c. Print the data portion of top_earners_NetID including only each employee's name, position, and salary in that order. (Include results in the HW Report.)
Without creating any new data sets, use the employee_roster data set to ...
d. Print a table of all male employees in the Administration section earning no less than $25,000 but no more than $30,000 in salary. Include only the employees' names, gender, section, and salary. (Include results in the HW Report.)
e. Print a table of all employees whose first name begins with either C, D, or E. Include only the employees' names, ID, and group. (Include results in the HW Report.)
f. Print a table that displays the average salary and median salary of male employees and female employees. Thus, there should only be two data rows. (Include results in the HW Report.)
2. The SAS data set batting contains a complete history of Major League Baseball's (MLB) batting data from 1871 through the 2010 season. Each observation holds a single season (i.e., year) of batting statistics for a single player. So each observation contains a unique combination of PlayerID, YearID, and TeamID.
a. Print the descriptor portion of the data set. (Include your results and response in the HW Report. You'll have to copy and paste it from the Log.)
b. Print a table that contains every player who had at least 245 hits (H) in a single season with one team. (Include results in the HW Report.)
- The output table should only contain each player's PlayerID, the YearID, the TeamID, and Hits for that season.
- Players might appear more than once in the list.
c. Print a table that shows the first (minimum) and last (maximum) year for each baseball league (LgID) represented in the data set. (Include results in the HW Report.)
d. Print a table that contains the player with the most home runs for each of the 140 seasons as long as their season home run total is at least 50. (Include results in the HW Report.)
- The output table should only contain the player's PlayerID, the YearID, and home runs for each year/season (row).
- If there was a tie for a given season, print all players who achieved the most home runs for that year.
Submitting your work to Compass -
You are to submit two (and only two) files for your homework submission.
1. Your SAS program file which should be saved as HWn_YourNetID.sas. For example, my file for the HW01A assignment would be HW01A_dunger.sas. All program statements and code should be included in one program file.
2. Your Report file which should be saved as HWn_YourNetID.pdf. For example, my file for HW01 would be HW01_dunger.pdf . Include all relevant output to address the exercises. Do not include output for every execution of your SAS program. For this homework, use ODS to send your results to a Portable Document Format (PDF) file.
Attachment:- Assignment Files.rar