Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve in SQL Database. 1) I want all salaries of faculty to have a dollar sign and commas and period before decimal. How would

Please solve in SQL Database.

1) I want all salaries of faculty to have a dollar sign and commas and period before decimal. How would you format that?

2) Display the faculty id, first name, last name, salary, but this time include another column called "Calculation" where salary will be divided by 1.55 and it will round the result to decimal places?

3) Write a SQL statement using the employees table and the ORDER BY clause that could retrive data in desceding order but only for employees id is below 125?

4) First use ROUND for month, then year, then do the same but use TRUNC Using one statement,round today's date to the nearest month and nearest year and truncate it to the nearest month and nearest year. Use an alias for each column.

5) USE LAST DAY What is the last day of the month for June 2005? Use an alias for the output.

6) ROUND(MONTHS_BETWEEN command Display the number of years between the Global Fast Foods employee Bob Millers birthday and today. Round to the nearest year. His id is 9? (from f_staffs)

7) Use the DUAL table to process the following numbers: 845.553 - round to one decimal place 30695.348 - round to two decimal places 30695.348 - round to -2 decimal places 2.3454 - truncate the 454 from the decimal place

8) UBSTR command

Use the string Oracle Internet Academy to produce the following output: The Net column with words only: net

9) LENGTH command

What is the length of the stringOracle Internet Academy?

10) Examine the following query: SELECT last_name, job_id, salary FROM employees WHERE job_id = 'SA_REP' OR job_id = 'AD_PRES' AND salary >15000;

Which results could not have been returned from this query?

a. Joe Everyone,sales representative,salary 15000 b. Jane Hendricks,sales manager,salary 15500 c. Arnie Smithers, administration president, 20000 d. Jordan Lim,sales representative,salary 14000

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago