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]
4 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]4 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
How will we achieve our goal
DanielleElmas [232]

Answer:

Take action. Try hard. Keep practicing. Explore a different way. Ask someone how to do it better. Do your best. Learn how others have done it. Build upon your strengths. Review and fix any mistakes. Don’t give up.

Hope this helped you!

Explanation:

6 0
4 years ago
5. One of the major road blocks for direct DC power in residences is the ___. A) generation of DC B) lack of standardization C)
Montano1993 [528]

Answer:

D) quantity of components required for this type of system

Explanation:

Electricity can be transmitted using the alternating and direct currents. The alternating current is one in which the flow of the current diverts at certain time intervals whereas, the direct current is one in which there is a constant one-directional flow of current. The DC is used in batteries and solar panels. Residential areas and business places make use of the AC current.

One of the several reasons why the DC is not used in homes is because unlike the AC it is not easy to build and sustain. Moreso, it has more components compared to the AC. For example, its motor consists of brushes and commutators . The components, example, switches are also large compared to the AC components.

6 0
4 years ago
Student A says used oil filters may be immediately dumped in the trash. Student B says used oil filters must be punctured and dr
pogonyaev
Chupapi munyanyo holaa
7 0
3 years ago
6. At a construction site, cement, sand, and gravel are used to make concrete. The ratio of cement to sand to gravel is 1 to 2.4
S_A_V [24]

Answer:

Mass of cement used is 62.5 lb

Mass of gravel used is 225 lb

Explanation:

The ratio given here is cement to sand to gravel = 1 : 2.4 : 3.6

So, for 150 lb of sand

C : S : G = 1 : 2.4 : 3.6

\frac{C}{S}=\frac{1}{2.4}\\\Rightarrow C=S\frac{1}{2.4}\\\Rightarrow C=150\frac{1}{2.4}\\\Rightarrow C=62.5\ lb

Mass of cement used is 62.5 lb

\frac{S}{G}=\frac{2.4}{3.6}\\\Rightarrow G=S\frac{3.6}{2.4}\\\Rightarrow C=150\frac{3.6}{2.4}\\\Rightarrow C=225\ lb

Mass of gravel used is 225 lb

7 0
3 years ago
Which stroke in the four stroke cycle begins as the piston reaches BDC after combustion takes place
Svet_ta [14]

Explanation:

Which stroke in the four stroke cycle begins as the piston reaches BDC after combustion takes place?

Answer :Exhaust stroke is the waste gasses discharging process into the atmosphere after the combustion stroke. This step takes place after the piston reaches the BDC at the end of the combustion stroke. When the piston reaches BDC, the piston will definitely move back to TDC.

This is the Answer for your question :3

I hoped I helped you :3

I hope you are having a great day ❤️❤️❤️

8 0
3 years ago
Other questions:
  • How many crankshaft is in V8 engine?​
    11·2 answers
  • Two materials are considered _______ if one material’s property degraded another.
    14·2 answers
  • Dimensional analysis: a)-Can be used to derive equations and non-dimensional numbers. b)-Helps in planning experiments. c)-Is an
    10·1 answer
  • Gold forms a substitutional solid solution with silver. Calculate the number of gold atoms per cubic centimeter (in atoms/cm3) f
    15·1 answer
  • Air is used as the working fluid in a simple ideal Brayton cycle that has a pressure ratio of 12, a compressor inlet temperature
    8·1 answer
  • A drum contains 3 black balls, 5 red balls and 6 green balls. If 4 balls are selected at random what is the probability that the
    6·1 answer
  • vertical gate in an irrigation canal holds back 12.2 m of water. Find the average force on the gate if its width is 3.60 m. Repo
    9·1 answer
  • A train travels 650 meters in 25 seconds. What is the train's velocity?
    9·1 answer
  • NO LINK plsssss just answer
    9·1 answer
  • Technician a says that the intake valve is closed during the power stroke. technician b says that the exhaust valve is closed du
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!