Qustion Paper SQL Final For Exam
Qustion Paper SQL Final For Exam
The HR department needs a report that displays the last name and hire date of
all employees who were hired in 2006.
2. Create a query that displays employees’ last names and commission amounts.
If an employee does not earn commission, show “No Commission.” Label the
column COMM.
3. Display the last names of all employees who have both an “a” and an “e” in
their last name.
4. Display the last name, job, department number, and the department name for
all employees who work in Toronto.
5. Create a report for HR that displays the department number, last name, and
job ID for every employee in the Executive department.
6. Create a report to display the last name and salary of employees who earn
between $5,000 and $12,000, and are in department 20 or 50. Label the columns
Employee and Monthly Salary, respectively.
7. The HR department wants to find the duration of employment for each
employee. For each employee, display the last name and calculate the number of
months between today and the date on which the employee was hired. Label the
column MONTHS_WORKED. Order your results by the number of months
employed. The number of months must be rounded to the closest whole number.
8. The HR department wants to determine the names of all employees who were
hired after Davies. Create a query to display the name and hire date of any
employee hired after employee Davies.
9. The HR department needs a report that displays the last name, department
number, and job ID of all employees whose department location ID is 1700.
10. Display the last names of all employees who have both an “a” and an “e” in
their last name.