0
0
Google Sheetsspreadsheet~5 mins

GROUP BY with aggregation in Google Sheets - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What does the GROUP BY clause do in a query?
GROUP BY groups rows that have the same values in specified columns into summary rows, like grouping all sales by each product.
Click to reveal answer
beginner
Which function would you use to find the total sum of a column after grouping?
You use the SUM() function to add up values in a column for each group.
Click to reveal answer
intermediate
How do you write a query to count the number of entries per category in Google Sheets QUERY function?
Use: SELECT Category, COUNT(Column) GROUP BY Category
Click to reveal answer
beginner
Why do you need to use GROUP BY when using aggregation functions?
Because aggregation functions like SUM or COUNT summarize data per group, GROUP BY tells the query how to group rows before summarizing.
Click to reveal answer
intermediate
In Google Sheets QUERY, what happens if you use an aggregation function without GROUP BY?
The aggregation function will calculate over the entire data set, returning a single summary value instead of grouped results.
Click to reveal answer
What does the GROUP BY clause do in a Google Sheets QUERY?
AFilters rows based on a condition
BDeletes duplicate rows
CSorts rows alphabetically
DGroups rows with the same values in specified columns
Which aggregation function counts the number of rows in each group?
ACOUNT()
BMAX()
CSUM()
DMIN()
What will this QUERY return? SELECT Category, SUM(Sales) GROUP BY Category
AAll sales rows without grouping
BTotal sales for each category
CSum of all sales without grouping
DNumber of categories
If you forget to add GROUP BY when using SUM(), what happens?
ASUM() returns zero
BYou get an error
CSUM() sums all rows ignoring groups
DSUM() counts rows instead
Which of these is a valid Google Sheets QUERY with grouping?
ASELECT Name, COUNT(Age) GROUP BY Name
BSELECT Name, COUNT(Age)
CSELECT COUNT(Age) GROUP BY Name
DSELECT Name, Age
Explain how GROUP BY works with aggregation functions in Google Sheets QUERY.
Think about how you would summarize sales by product category.
You got /3 concepts.
    Describe a real-life example where you would use GROUP BY with SUM in Google Sheets.
    Imagine you want to know total sales per product.
    You got /3 concepts.