Question: You are presented with the following SQL query that needs a minor change. You need to add a column to the output, which will subtract

You are presented with the following SQL query that needs a minor change. You need to add a column to the output, which will subtract the tax amount from the invoice total, to return the Sales Amount.
SELECT TOP(10)
SalesOrderNumber
OrderDate,
SUM(InvoiceTotal) AS InvoiceSubTotal,
SUM(TaxAmt) AS TaxAmount,
FROM FactInternetSales
ORDER BY InvoiceTotalASC
Which of the following lines would achieve this desired result?
SUM(InvoiceTotal) LESS SUM (TaxAmt) AS SalesTotal
SalesTotal = SUM(InvoiceTotal)- SUM (TaxAmt)
SUM(InvoiceTotal)- SUM (TaxAmt)== SalesTotal
SUM(InvoiceTotal)- SUM (TaxAmt) AS SalesTotal

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!