Scenario 7
Directions
This scenario uses the
Certadv.Empdata data set. Write an SQL query that does the following:
-
Create a temporary table Work.Bonus.
-
Include only the following variables
in your report: EmpID, JobCode, and Salary.
-
Create a new column named Bonus
that contains an amount equal to 10% of the employee’s salary.
-
Order the query by the variable
JobCode and then by Salary.
Test Your Code
-
What is the Bonus amount
for EmpID E00029?
-
What is the value of
Bonus for observation 4 in the Work.Bonus table?
Exam Objective
Generate detailed reports
by working with a single table, joining tables, or using set operators
in SQL.
Last updated: October 16, 2019