Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

#9, please help me write query using SQL Management Studio and run to show outpu

ID: 3919805 • Letter: #

Question

#9, please help me write query using SQL Management Studio and run to show output, thanks

ll lable, subtract the condo fee from the tota 9. SQL includes many numerical functions. Two of these functions are FLOOR and CEIL uu TeeS Tor the appropriate owner 19. Us th Use the Internet to research these functions. Are the functions available in Oracle Server, and Access? Write a paragraph that discusses what the functions do and any differences and/or similarities between the functions in Oracle, SQL Server, and Access Then perform the following tasks: a. Solmaris Condominium Group would like to know the impact of discounting its condo fees by 3 percent. Write an SQL statement in Oracle that displays the condo ID, unt discounted condo fee with the FLOOR function. Based on your research, will the values in the three columns vary? If so, how? Use number, discounted condo fee, discounted condo fee with the CEIL function, and b. the condo with the ID of 1 to explain your answer. Be sure to cite your references.

Explanation / Answer

Part 1.

Yes FLOOR and CEIL functions are available in Oracle and SQL. They are also availble in Access with names Int and Ceiling respectively.

FLOOR: Used to get the highest integer less than or equal to the number. If the input is a decimal, it returns only the integer part.

ex. - FLOOR(2.58) -> 2

CEIL: Used to get the lowest integer greater than or equal to the number. If the input is a decimal, it returns the next number to the ingteger part of the number

ex. - CEIL(2.58) -> 3

These are numeric functions and do not have any differences based upon the application.

Part 2.

Assuming (May change upon previous parts of question)

Table: condo

Columns: condo_id, unit_number, condo_fee

Query: SELECT condo_id, unit_number, (condo_fee * 0.97) AS discounted, CEIL(condo_fee * 0.97) AS discounted_ceil, FLOOR(condo_fee * 0.97) AS discounted_floor FROM condo;

The three columns might vary. discounted may be a decimal number, in which case discounted_ceil will be the next integer and discounted_floor will be the previous integer. If discounted is integer, all three columns will be same.

For example if condo_fee for condo_id 1 is 123. discounted = 119.31, discounted_ceil = 120, discounted_floor = 119