How can I use Google Sheets Query to sum multiple columns? 2

How can I use Google Sheets Query to sum multiple columns?

Google Sheets Query is a powerful tool that allows users to retrieve, manipulate, and analyze data within a spreadsheet. With this tool, it is possible to sum multiple columns of data by using the SUM function within the QUERY formula. This allows for efficient and accurate calculation of data from different columns, eliminating the need for manual summing. By specifying the columns to be summed within the QUERY formula, users can easily obtain the total sum of multiple columns in their Google Sheets spreadsheet. This feature saves time and effort, making data analysis and calculations more efficient and convenient.

Google Sheets Query: Sum Multiple Columns


You can use the following syntax to calculate the sum of multiple columns within a Google Sheets query:

=QUERY(A1:D8,"select A,B+C+D",1)

This particular example will return the values in column A along with a column that shows the sum of values in columns B, C, and D.

We also specify a 1 to indicate that there is 1 header row at the top of the dataset.

The following example shows how to use this formula in practice.

Example: Sum Multiple Columns in Google Sheets Query

Suppose we have the following dataset in Google Sheets that shows the total points scored by various basketball teams during different games:

We can use the following query to return each team name along with the sum of points scored in all three of their games:

=QUERY(A1:D8,"select A,B+C+D",1)

The following screenshot shows how to use this query in practice:

Google Sheets query sum multiple columns

From the results we can see:

  • The Mavs scored a total of 302 points across all three games.
  • The Warriors scored a total of 293 points across all three games.
  • The Lakers scored a total of 293 points across all three games.

And so on.

Note that we could also use the to give a specific label to the results of the summed columns:

=QUERY(A1:D8,"select A,B+C+D label B+C+D 'Total Points'",1)

The three columns that we summed together now have a “Total Points” label.

The following tutorials explain how to perform other common tasks in Google Sheets

Google Sheets Query: How to Use Group By

Cite this article

stats writer (2024). How can I use Google Sheets Query to sum multiple columns?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-query-to-sum-multiple-columns/

stats writer. "How can I use Google Sheets Query to sum multiple columns?." PSYCHOLOGICAL SCALES, 27 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-query-to-sum-multiple-columns/.

stats writer. "How can I use Google Sheets Query to sum multiple columns?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-query-to-sum-multiple-columns/.

stats writer (2024) 'How can I use Google Sheets Query to sum multiple columns?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-google-sheets-query-to-sum-multiple-columns/.

[1] stats writer, "How can I use Google Sheets Query to sum multiple columns?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I use Google Sheets Query to sum multiple columns?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top