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
For each function , sketch the Bode asymptotic magnitude and asymptotic phase plots.
horrorfan [7]

Answer:

attached below

Explanation:

a) G(s) = 1 / s( s+2)(s + 4 )

Bode asymptotic magnitude and asymptotic phase plots

attached below

b) G(s) = (s+5)/(s+2)(s+4)

phase angles = tan^-1 w/s , -tan^-1 w/s , tan^-1 w/4

attached below

c) G(s)= (s+3)(s+5)/s(s+2)(s+4)

solution attached below

5 0
3 years ago
Suppose there are n chairs in a row. We want to compute the number of ways to put 2 students into seats so that they are not nex
icang [17]

Complete Question

The complete question is shown on the first uploaded image

Answer:

a) f_{(n)} = f_{(n-1)} + n-2

b) g_{(n)} = g_(n+1) + (n-2)

Explanation:

The explanation is shown on the second and third uploaded image

8 0
3 years ago
It is given that 50 kg/sec of air at 288.2k is iesntropically compressed from 1 to 12 atm. Assuming a calorically perfect gas, d
denis23 [38]

The exit temperature is 586.18K and  compressor input power is 14973.53kW

Data;

  • Mass = 50kg/s
  • T = 288.2K
  • P1 = 1atm
  • P2 = 12 atm

<h3>Exit Temperature </h3>

The exit temperature of the gas can be calculated isentropically as

\frac{T_2}{T_1} = (\frac{P_2}{P_1})^\frac{y-1}{y}\\ y = 1.4\\ C_p= 1.005 Kj/kg.K\\

Let's substitute the values into the formula

\frac{T_2}{T_1} = (\frac{P_2}{P_1})^\frac{y-1}{y} \\\frac{T_2}{288.2} = (\frac{12}{1})^\frac{1.4-1}{1.4} \\ T_2 = 586.18K

The exit temperature is 586.18K

<h3>The Compressor input power</h3>

The compressor input power is calculated as

P= mC_p(T_2-T_1)\\P = 50*1.005*(586.18-288.2)\\P= 14973.53kW

The compressor input power is 14973.53kW

Learn more on exit temperature and compressor input power here;

brainly.com/question/16699941

brainly.com/question/10121263

6 0
2 years ago
provides steady-state operating data for a solar power plant that operates on a Rankine cycle with Refrigerant 134a as its worki
Vaselesa [24]

Answer:

hello some parts of your question is missing attached below is the missing part ( the required fig and table )

answer : The solar collector surface area = 7133 m^2

Explanation:

Given data :

Rate of energy input to the collectors from solar radiation = 0.3 kW/m^2

percentage of solar power absorbed by refrigerant = 60%

Determine the solar collector surface area

The solar collector surface area = 7133 m^2

attached below is a detailed solution of the problem

8 0
3 years ago
Why do we need technical sketching?
Scrat [10]

Technical Drawings give a better understanding of what is needed and required in the project.

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • One-dimensional, steady-state conduction with uniform internal energy generation occurs in a plane wall with a thickness of 50 m
    14·1 answer
  • Two balanced Y-connected loads in parallel, one drawing 15kW at 0.6 power factor lagging and the other drawing 10kVA at 0.8 powe
    13·1 answer
  • A 3-phase induction motor with 4 poles is being driven at 45 Hz and is running in its normal operating range. When connected to
    12·1 answer
  • An air standard cycle with constant specific heats is executed in a closed system with 0.003 kg of air and consists of the follo
    15·1 answer
  • 6.3.3 Marks on an exam in a statistics course are assumed to be normally distributed
    14·1 answer
  • 6. What symptom will be exhibited on an engine equipped with a pneumatic governor system if the cooling fins
    14·1 answer
  • Chad is working on a design that uses the pressure of steam to control a valve in order to increase water pressure in showers. W
    5·1 answer
  • 2. The following segment of carotid artery has an inlet velocity of 50 cm/s (diameter of 15 mm). The outlet has a diameter of 11
    13·1 answer
  • (25%) A well-insulated compressor operating at steady state takes in air at 70 oF and 15 psi, with a volumetric flow rate of 500
    12·1 answer
  • In the situation shown below, what would the Moon look like from Earth? Sun, Earth and Moon Four Moon Views A. View A B. View B
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!