DBS 301 Lab 2 – Week 2 (SELECT, RANGE, ORDER)


Category: You will Instantly receive a download link for .zip solution file upon Payment


5/5 - (4 votes)

This week’s lab continues using the SELECT command and learning the interfaces for both SQL
Getting Started
Your submission will be a single text-based SQL file with the solutions provided.
Create a new Worksheet in SQL Developer. Save the file as
Your submission needs to be commented and include the question, the solutions, and the
results. An example is provided!
• Display the employee_id, last name and salary of employees earning in the range of
$8,000 to $10000 inclusive. Sort the output by top salaries first and then by last name.
• Modify previous query (#1) so that additional condition is to display only if they work as
Programmers or Sales Representatives. Use same sorting as before.
• The Human Resources department wants to find high salary and low salary employees.
Modify previous query (#2) so that it displays the same job titles but for people who
earn outside the range of $8,000 to $11000 exclusive. Use same sorting as before.
• The company needs a list of long term employees, in order to give them a thank you
dinner. Display the last name, job_id and salary of employees hired after 2016. List the
most recently hired employees first.
• Modify previous query (#4) so that it displays only employees earning more than
$12,000 and hired before 2017. List the output by job title alphabetically and then by
highest paid employees.
Display the job titles and full names of employees whose first name contains an ‘c’ or ‘C’
• Create a report to display last name, salary, and commission percent for all employees
that earn a commission and a salary less than 9000.
• Do the same as question 7, but put the report in order of descending salaries.
• Do the same as 8, but use a numeric value instead of a column name to do the sorting.
Example Submission
— ***********************
— Name: Your Name
— ID: #########
— Date: The current date
— Purpose: Lab 2 DBS301
— ***********************
— Question 1 – write a brief note about what the
question is asking
— Question 2 – blah blah blah