M
M
Marro4202021-04-02 21:39:07
SQL
Marro420, 2021-04-02 21:39:07

How to sum rows from a query?

I have a query
SELECT Sum(Types of Work to be Performed.Price)+Sum(Services.PriceServices)+Sum(Parts.Price*Repair.Quantity) AS Total Contract.ContractCode
FROM Services INNER JOIN (Parts INNER JOIN ((Contract INNER JOIN Repair ON Contract.ContractCode = Repair.ContractCode) INNER JOIN (Types of Works Performed INNER JOIN Works Performed ON Types of Works Performed.JobCode = Works Performed.WorkCode) ON Contract.ContractCode = Works Performed.ContractCode) ON Accessories.KitCode = Repair.KitCode) ON Services.ServicesCode = Works Conducted
GROUP BY Contract. Contract Code;
it turns out such a label
6067649592132173720958.png
Is it possible to sum up all the rows from the Total column?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question