Picture 7.1
Question 8:
Write a query to display JobID, Job Title, NumberOfEmployees, AverageOfSalary of the jobs having the number of employees greater than or equal to 20 and display the results in ascending order of AverageOfSalary.
Note: the image is only sample output. The result depends on the entered data
JobID
Job Title
NumberOf Employees
20
20
Average Of Employees
2785
ST_CLERK
Stock Clerk
Shipping Clerk
3215
8350
1
2
3
SH CLERK
Sales Representative 30
SA REP
Picture 8.1
Question 9:
Create a stored procedure named pr1 to calculate the number of employees in a given country and job title.
where @countryID varchar(10), @jobtitle varchar(100) are input paramaters and @numberOfEmployees int is an output parameter of the procedure.
For example, when we execute the procedure pr1 using the following statements, the result
FUO
+ 100%
Zoom
Close