Question: I need some help to complete those SQL Plus commands Question 1 Use the tables in your schema. What is the total salary of all

I need some help to complete those SQL Plus commands

Question 1 Use the tables in your schema. What is the total salary of all employees. Format the answer as a dollar amount and label the column as Total Salary ********************

/******************** Question 2 Use the tables in your schema. For all employees whose last name starts with the letter R (protect against upper/lowercase anomalies using a function), display the employee's last name with the first letter capitalized and all other letters lowercase (be sure to use a function to enforce this), and give the length of their last name. Give the first column a label of "Last Name" and the second "Length". Sort the results in descending order by the employee's last name. ***********

************** Question 3 Use the tables in your schema. For each employee, generate a userid by taking the first letter of their first name, concatenating that with the first 5 letters of their last name and then adding the last 2 digits of their phone number label this "USERID". All letters must be in lower case. Show the employee, first name, last name, phone number and userid sorted by employee last name in ascending sequence. HINT: Phone numbers are not all the same length, so you will need to use the LENGTH function. **********************************************************************************/

/************* Question 4 Use the tables in your schema. Your boss was at a company party and met a fellow employee whose last name was Olson, or Olsen, or something else like that. He wasn't quite sure (his hearing is bad when he drinks). He wants you to run a query that will get the first and last name of all employees whose last name sounds like Olson, along with and the name of the department for which they work. He is sure once he sees the name and department he will remember the person. Make sure you use a function to check for the sound of the name. Use both SQL/86 and SQL/92. **********************************************************************************/ -- SQL/86 --

-- SQL/92 with ON --

-- SQL/92 with USING --

/********************** Question 5 Use the tables in your schema. Write a query that produces the following for each employee whose last name begins with an R: earns monthly but wants <3 times salary>. Use a function to format the salary with a dollar sign, commas, and 2 decimal places. If formatting salaries in this way introduces extra spaces, use a trimming function to get rid of them. (Hint: This will likely require nesting functions - one within the other.) Label the single column produced as "Dream Salaries". Protect against upper/lowercase anomalies in the database using a function. ***********

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!