Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL HELP - I have some of this done, but am stuck and need help. Please see table below for column headings. Thank you. 1.

SQL HELP - I have some of this done, but am stuck and need help. Please see table below for column headings. Thank you.

1. . Navigate to the SQL command window and create a SQL query that will give the product ID, product description, sysdate and product list price from the PRODUCT_INFORMATION table. Use the TO_CHAR function with the dollar/currency format to display the price in American dollars and cents.

2. Modify the previous SQL query you created in #1, so it also displays the date three months from now. To make this query as flexible as possible use SYSDATE with the LAST_DAY() function to get the last day of this month, along with the ADD_MONTHS() function to display the date three months from now. The purpose of this SELECT statement is to show how long the given price of the product will be in effect, so add a column alias to the date column saying, Price good until.

3. Write a SQL query that will give the employee number, employee name and hired date from the EMP table. Use the TO_CHAR function along with the format mask DDMMYYY to display the hired date. Display a column alias for the hire date.

4. Write a query that will select the ORDER_ID, CUSTOMER_ID and ORDER_DATE columns from the orders table. Use the to_char() function to display the date data from the ORDER_DATE column in a format that has the day as two numbers, the month as the first three characters of the name of the month, the full year as numbers, the hour and the minute. Use a column alias to display the order date as ORDER_DATEimage text in transcribed

No Yes Yes Yes Yes PRODUCT ID PRODUCT NAME PRODUCT DESCRIPTION CATEGORY ID WEIGHT CLASS WARRANTY_PERIOD NUMBER(6,0) VARCHAR2(50 VARCHAR2(2000 NUMBER(2,0) NUMBER(1,0 INTERVAL YEAR(2) TO Yes MONTH NUMBER(6,0) VARCHAR2(20 NUMBER(8,2 NUMBER(8,2) VARCHAR2(50 SUPPLIER ID PRODUCT STATUS LIST PRICE MIN PRICE CATALOG URL Yes Yes Yes Yes Yes No Yes Yes Yes Yes PRODUCT ID PRODUCT NAME PRODUCT DESCRIPTION CATEGORY ID WEIGHT CLASS WARRANTY_PERIOD NUMBER(6,0) VARCHAR2(50 VARCHAR2(2000 NUMBER(2,0) NUMBER(1,0 INTERVAL YEAR(2) TO Yes MONTH NUMBER(6,0) VARCHAR2(20 NUMBER(8,2 NUMBER(8,2) VARCHAR2(50 SUPPLIER ID PRODUCT STATUS LIST PRICE MIN PRICE CATALOG URL Yes Yes Yes Yes Yes

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

More Books

Students also viewed these Databases questions

Question

How can arrogance in an organization be combatted?

Answered: 1 week ago

Question

Describe the factors influencing of performance appraisal.

Answered: 1 week ago

Question

What is quality of work life ?

Answered: 1 week ago