This week’s lab continues using the SELECT command and learning the interfaces for both SQL
Developer.
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
L02_ID_LASTNAME.sql
Your submission needs to be commented and include the question, the solutions, and the
results. An example is provided!
Tasks
• 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’
anywhere.
• 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
SELECT * FROM TABLE;
— Question 2 – blah blah blah
(SELECT, 2, 301, DBS, Lab, ORDER), Range, Week, –
[SOLVED] Dbs 301 lab 2 – week 2 (select, range, order)
$25
File Name: Dbs_301_lab_2_–_week_2_(select,_range,_order).zip
File Size: 442.74 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.