Question on Oracle Sql & Pl ((Note: is Oracle Sql, not MYSQL)) Here are the questions. I did the homework. Just check my work under 'My Work' (see...
This question has been answered
Question

Question on Oracle Sql & Pl ((Note: is Oracle Sql, not MYSQL))

Here are the questions. I did the homework. Just check my work under "My Work" (see below / scroll down) and tutor me on any problems (if you find any). If not, just gives my work a thumbs up if it looks good


EXERCISE 1 _Write a SELECT statement that returns these columns from the Products table:

The list_price column

A column that uses the TO_CHAR function to return the list_price column with currency formatting


EXERCISE 2 _Write a SELECT statement that returns these columns from the Products table:

The date_added column

A column that uses the CAST function to return the date_added column as VARCHAR2 data type with 9 characters the


EXERCISE 3 _Write a SELECT statement that returns these columns from the Products table:

The list_price column

The discount_percent column

A column named discount_amount that uses the previous two columns to calculate the discount amount and uses the ROUND function to round the result so it has 2 decimal digits 


My Work:


-- Ex 1

select list_price, to_char(list_price, '9,999,999.99') AS "list_price_with_currency_formatting"

from products


-- Ex 2

SELECT date_added, CAST(date_added as varchar(10)) AS date_added_as_varchar2_date_type 

FROM products


-- Ex 3

SELECT list_price, 

discount_percent, 

ROUND(((list_price * discount_percent) / 100), 2) AS discount_amount 

FROM products 


(where possible test these queries yourself to evaluate their accuracy, and compare them to the exercise requirements to verify their accuracy)

Answered by Expert Tutors

icitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel l

nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolo
Step-by-step explanation

llentesque dapibus efficitur laorm ipsum dolorctllentiscing elit. Nam laicitongue vel laorefe veipiscinxip, ultrxDonec aliquet. Lorem ipsum dolor sit ametiturdictum vitae odio. Donllentiscing elit. Nam laicitongue vel laorefusce dui lectip, ultrxDonec aliquet. Lorem ipsum dolor sit ametiturmolestie consefsque dapibusuongue vel laorctuipiscing ee voec facoxogoip, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consecteturatoamodictum vitosullentipiscinoe vur laoreet. Nam risus antceoctullenta moleoiniaoe voflestata molestieorinia pulsum doec aliquet. Lore vng elit. Nam lacinia pulvinarconsecFusccesus ante, dapibussuat, ulceofom rioipiscinorisoamor nec facilisis. Pellentesque dapibus efsudictum viipsumitur laoreet. Niniaosuosuat, ultrices ac magna. Fusnecorem ipnec facilisis. Pel


ex2.PNG



ec f


ex3.PNG

2 Attachments
ex2.PNG
PNG
ex3.PNG
PNG
The student who asked this found it Helpful
Overall rating 100%
Get unstuck

439,573 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses