1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
topjm [15]
3 years ago
9

Write a SELECT statement that returns these column names and data from the Products table: product_name The product_name column

list_price The list_price column discount_percent The discount_percent column discount_amount A column that’s calculated from the previous two columns discount_price A column that’s calculated from the previous three columns Round the discount_amount and discount_price columns to 2 decimal places. Sort the result set by the discount_price column in descending sequence. Use the LIMIT clause so the result set contains only the first 5 rows.
Engineering
1 answer:
I am Lyosha [343]3 years ago
5 0

Answer:

 SELECT  

   product_name, list_price, discount_percent,    

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

   ROUND(list_price - (discount_percent / 100 * list_price), 2)  AS discount_price  

FROM

Products

ORDER BY (list_price - (discount_percent / 100 * list_price)) DESC

LIMIT 5;

Explanation:

In the above SELECT statement is used to select columns from Products table.

The columns are  product_name,list_price and discount_percent

Next a column discount_amount is selected which is the calculated from previous two columns that are list_price and discount_percent. The discount amount is basically calculated by multiplying list_price with discount_percent/100 and the resultant column is named as discount_amount using Alias which is used to give a temporary name to set of columns or a table.

Next another column discount_price is obtained from previous three columns that are  list_price , discount_percent and discount_amount as: list_price - (discount_percent / 100 * list_price) This as a whole is given a column name discount_price.

FROM is used to refer to a table from which these columns are to be selected. The table name is Product.

The result set is sorted in descending order by discount_price so ORDER BY is used to order the resultant records and DESC is used to sort these records according to the discount_price in descending order.

LIMIT statement is used to extract the records from Product and limit the number of rows returned as a result based on a limit value which is 5 here.

You might be interested in
14. A large car fire presents the possibility of
dexar [7]

Answer:

Both of the above

Explanation:

5 0
2 years ago
Read 2 more answers
People with skills and training in areas such as marketing or accounting are an important part of the manufacturing industry.
adelina 88 [10]

Answer:

true

Explanation:

8 0
2 years ago
Define factors that can change the performance of a polymer, such are additives
inna [77]

Answer:

 The performance of the polymer is basically change by the various type of factors like shape, tensile strength and color.

The polymer based products are basically influenced by the environmental factors like light, acids or alkalis chemicals, salts and also heat.

The additives is one of the type of chemical polymer which basically include polymer matrix for improving the ability of processing of the polymer. It also helps to enhance the production and requirement of the polymer products in the environment.

8 0
3 years ago
Consider CO at 500 K and 1000 kPa at an initial state that expands to a final pressure of 200 kPa in an isentropic manner. Repor
REY [17]

Answer:

T_2=315.69k

Explanation:

Initial Temperature T_1=500K

Initial Pressure P_1=1000kPa

Final Pressure P_2=200kPa

Generally the gas equation is mathematically given by

\frac{T_2}{T_1}=\frac{P_2}{P_1}^{\frac{n-1}{n}}

Where

n for CO=1.4

Therefore

\frac{T_2}{500}=\frac{200}{1000}^{\frac{1.4-1}{1.4}}

T_2=315.69k

7 0
3 years ago
B is the desired product, and X and Y are foul pollutants that are expensive to get rid of. The specific reaction rates are at 2
AURORKA [14]

Answer:

See attachment for detailed answer.

Explanation:

Download pdf
3 0
3 years ago
Other questions:
  • A closed, rigid, 0.45 m^3 tank is filled with 12 kg of water. The initial pressure is p1 = 20 bar. The water is cooled until the
    15·1 answer
  • Consider five wireless stations A,B,C,D,E. Station
    5·2 answers
  • Helium gas expands in a piston-cylinder in a polytropic process with n=1.67. Is the work positive, negative or zero?
    8·1 answer
  • which systems engineering support discipline has the goal to ensure that support considerations are an integral part of the syst
    14·1 answer
  • The housing for a certain machinery product is made of two components, both aluminum castings. The larger component has the shap
    10·1 answer
  • A fair die is thrown, What is the probability gained if you are told that 4 will
    12·1 answer
  • How would you design a wheelchair for wheelchair-using basketball players? Would you make it more or less massive?
    11·1 answer
  • Technician A says that the low level brake fluid switch on a master cylinder will turn on the brake warning light when the syste
    9·1 answer
  • T/f
    10·1 answer
  • A farmer has 12 hectares of land on which he grows corn, wheat, and soybeans. It costs $4500 per hectare to grow corn, $6000 to
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!