Answer:
See explanation below
Step-by-step explanation:
SELECT list_price,
FORMAT(list_price, 1) AS formatted_list_price,
CONVERT(INT, list_price) AS converted_list_price,
CAST (list_price AS INT) AS casted_list_price
FROM products_table;
In SQL, the SELECT statement is used to initiate a query. It lists the variables that will be contained in the output, just like choosing items on a list, with each item being separated by a comma.
The FORMAT, CONVERT, CAST are all functions that are used to change the format of a value. Their formats are;
- FORMAT - Format (value, decimal places)
- CONVERT - Convert (datatype, value)
- CAST - Cast ( value AS datatype
In SQL, aliases are used to rename variables (usually those that contain functions) to ones taste. The AS is used after the function and the new name follows right after.