carlos9742 carlos9742
  • 17-12-2020
  • Computers and Technology
contestada

Write a query to find the customer balance summary (total, min, max, avg) for all customers who have not made purchases during the current invoicing period

Respuesta :

IfeanyiEze8899 IfeanyiEze8899
  • 19-12-2020

Answer:

SELECT SUM(customer_balance) as Total, MIN(customer_balance) as minimum_balance, Max(customer_balance) as maximum_balance, AVG(customer_balance) as average_balance FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM invoice)

Explanation:

The SQL query statement returns four columns which are aggregates of the column customer_balance from the customers table in the database and the rows are for customers that have not made any purchase during the current invoicing period.

Answer Link

Otras preguntas

Help, please! In a fully-developed paragraph, argue that The Epic of Gilgamesh either reflects aspects of Mesopotamian life or that it is a universal story with
PLEASE HELP IM SO CONFUSED
Which generates waves that are capable of traveling through a vacuum? a light bulb O a speaker earthquake activity volcanic eruption
What were some basic beliefs of some early Christians
Which statement is true about socialism? the government redistributes the wealth so that everyone has the same amount of money only the neediest people in soc
What are the negative impacts in third world countries.???
What is the answer??
How many marbles are left if 9 friends equally share a package of 75 marbles?
Solve for 9x-3-8x=7-x​
Which relationships have the same constant of proportionality between y and x as the following graph? choose two answers