Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The Orion. Staff table 4. Conditional Processing Create a report that displays E

ID: 3179747 • Letter: T

Question


The Orion. Staff table
4. Conditional Processing Create a report that displays Employee ID, Level, Salary, and Salary Range using the orion.staff table. Level and Salary Range are two new columns in the report. The report should also contain salary information for only the Orion Star executives. Conditionally, assign values to the two newl columns as follows: Salary Ranges Job Title Last Word) Level Low Medium High Manager Manager 52,000 52,000-72,000 72,000 Director Director 108,000-135,000 135,000

Explanation / Answer

Code:

data temp1;
set orion.staff;

if job_title = 'Manager' then Level = 'Manager';else
if job_title = 'Director' then Level = 'Director';else
if job_title = 'Officer' or job_title = 'President' then Level = 'Executive';else
Level = 'not applicable';


if job_title = 'Manager' and salary<52000 then salary_range= 'Low';else
if job_title = 'Manager' and salary>=52000 and salary>=72000 then salary_range= 'Medium';else
if job_title = 'Manager' and salary>72000 then salary_range= 'High';else


if job_title = 'Director' and salary<108000 then salary_range= 'Low';else
if job_title = 'Director' and salary>=108000 and salary>=135000 then salary_range= 'Medium';else
if job_title = 'Director' and salary>135000 then salary_range= 'High';else

if job_title = 'Officer' or job_title = 'President'and salary<240000 then salary_range= 'Low';else
if job_title = 'Officer' or job_title = 'President'and salary>=240000 and salary>=300000 then salary_range= 'Medium';else
if job_title = 'Officer' or job_title = 'President'and salary>300000 then salary_range= 'High';

else salary_range = 'not_include';

run;


proc sql;
select employee_id, level,salary,salary_range
from temp1
where salary_range ne 'not_include';
quit;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote