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
SVEN [57.7K]
3 years ago
11

Write a SELECT statement that returns one row for each customer that has orders with these columns: The email_address column fro

m the Customers table A count of the number of orders The total amount for each order (Hint: First, subtract the discount amount from the price. Then, multiply by the quantity.) Return only those rows where the customer has more than 1 order. Sort the result set in descending sequence by the sum of the line item amounts
Engineering
1 answer:
Dafna11 [192]3 years ago
8 0

Answer:

The statement is as follows:

Explanation:

We had better avoid such correlated subqueries by instead using aggregation with GROUP BY:

SELECT

   c.email_address,

   COUNT(DISTINCT o.order_id) AS num_orders,

   COALESCE(SUM(oi.quantity * (oi.item_price - oi.discount_amount)), 0) AS total_amount

FROM customers c

LEFT JOIN orders o

   ON c.customer_id = o.customer_id

INNER JOIN order_items oi

   ON o.order_id = oi.order_id

GROUP BY

   c.customer_id,

   c.email_address;

You might be interested in
What's the highest grade level that brainly accomodates
taurus [48]

Answer:

The highest grade level is college.

3 0
3 years ago
What is polarized electrical receptacle used for
lidiya [134]

Answer:

they are used for electrical currents so that they can flow along the appropriate wires in the circuit

Explanation:

4 0
4 years ago
A 4-stroke Diesel engine with a displacement of Vd = 2.5x10^-3m^3 produces a mean effective pressure of 6.4 bar at the speed of
yKpoI14uk [10]

Answer:

The power developed by engine is 167.55 KW

Explanation:

Given that

V_d=2.5\times 10^{-3} m^3

Mean effective pressure = 6.4 bar

Speed = 2000 rpm

We know that power is the work done per second.

So

P=6.4\times 100\times 2.5\times 10^{-3}\times \dfrac{2\pi \times2000}{120}

We have to notice one point that we divide by 120 instead of 60, because it is a 4 cylinder engine.

P=167.55 KW

So the power developed by engine is 167.55 KW

4 0
3 years ago
Comparison of density values determines whether an item will float or sink in water. For each of the values below, determine the
geniusboy [140]

Answer:

a) the object floats

b) the object floats

c) the object sinks

Explanation:

when an object is less dense than in the fluid in which it is immersed, it will float due to its weight and volume characteristics, so to solve this problem we must find the mass and volume of each object in order to calculate the density and compare it with that of water

a)

volumen for a cube

V=L^3

L=1.53in=0.0388m

V=0.0388 ^3=5.8691x10^-5m^3=58.69ml

density=m/v

density=13.5g/58.69ml=0.23 g/ml

The wooden block floats  because it is less dense than water

b)

m=111mg=0.111g

density=m/v

density=0.111g/0.296ml=0.375g/ml

the metal paperclip floats   because it is less dense than water

c)

V=0.93cups=220.0271ml

m=0.88lb=399.1613g

Density=m/v

density=399.1613/220.027ml=1.8141g/ml

the apple sinks   because it is  denser than water

4 0
3 years ago
An angle is observed repeatedly using the same equipment and procedures producing the data below:35 ∘ 40'00",35 ∘ 40'10",35 ∘ 40
Helen [10]

Answer: (a) +/- 7.5° (b) +/- 3.75°

Explanation:

See attachment

6 0
3 years ago
Other questions:
  • Alyssa works for an engineering firm that has been hired to design and supervise the construction of a highway bridge over a maj
    11·1 answer
  • What are the three main areas of bioengineering?
    11·1 answer
  • A manufacturer makes integrated circuits that each have a resistance layer with a target thickness of 200 units. A circuit won't
    5·1 answer
  • Air is compressed in the compressor of a turbojet engine. Air enters the compressor at 270 K and 58 kPa and exits the compressor
    13·1 answer
  • Why does the auto industry prefer uniform (national) standards for automobile emissions as opposed to regionally varying standar
    11·1 answer
  • Annie has collected several items from around her house. She is using these objects to investigate which objects are attracted t
    12·1 answer
  • Wastewater flows into a _________ once it is released into a floor drain.
    8·1 answer
  • SEICUL UC CULTELL allsvel.
    9·2 answers
  • Explain why surface temperature increases when two bodies are rubbed against each other. What is the significance of temperature
    13·1 answer
  • Which of the following is NOT a line used on blueprints?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!