Description
Lab 3 – Week 3 (Single-Line Functions)
This week’s lab continues using the SELECT command and learning the interfaces for both SQL Developer and introduces the use of single-line functions.
Getting Started
Your submission will be a single text-based SQL file with appropriate header and commenting. Please ensure your file runs when the entire file is executed in SQL Developer.
Create a new Worksheet in SQL Developer. Save the file as L03_ID#_LASTNAME.sql
Your submission needs to be commented and include the question, the solutions, and the results. An example is provided!
Tasks
the result will depend on the day when you RUN/EXECUTE this query. Label the column “Tomorrow”.
2. For each employee in departments 20, 50 and 60 display last name, first name, salary, and salary increased by 4% and expressed as a whole number. Label the column “Good Salary”.
Also add a column that subtracts the old salary from the new salary and multiplies by 12. Label the column “Annual Pay Increase”.
3. Write a query that displays the employee’s Full Name and Job Title in the following format:
DAVIES, CURTIS is ST_CLERK
Only employees whose last name ends with S and first name starts with C or K. Give this column an appropriate label like Person and Job. Sort the result by the employees’ last names.
a. Label the column Years worked.
b. Order your results by the number of years employed. Round the number of years employed up to the closest whole number.
DBS301 – Database Design II and SQL using Oracle Lab 3 – Week 3
a. Label the column REVIEW DAY.
b. Format the dates to appear in the format like:
Example Submission
— ***********************
— Name: Your Name
— ID: #########
— Purpose: Lab 3 DBS301
— ***********************
— Question 1 – write a brief note about what the question is asking
— Q1 SOLUTION —
SELECT * FROM TABLE;
— Question – blah blah blah
Reviews
There are no reviews yet.