Respuesta :

Using a subquery:

SELECT CustID,

FName,

LName,

(SELECT Sum (Saleprice * quantity)

FROM SaleProduct SP

JOIN Sale s

ON SP.PurchaseID = s.Purchase ID

WHERE S.CustID = C.CustID) AS TotalSold

FROM Customer C

What is a subquery?
A subquery is a query that is contained within a SELECT, INSERT, UPDATE, or DELETE statement, as well as within another subquery. Anywhere an expression is allowed, a subquery can be utilized.

In addition to being known as an inner query or inner select, a subquery is also known as an outer query or outer select in the statement it is contained in. Many statements in Transact-SQL that contain subqueries can also be written as joins. Only via subqueries can other questions be posed.

To learn more about a subquery, use the link given
https://brainly.com/question/29525281
#SPJ4