How to properly group by in a Google Query

728 views Asked by At

I'm trying to get the following table from the query shown in the image below.

 ------------
| Mike  | 60 |
| Zoe   | 50 |
| Abby  | 20 |
| Jimmy | 80 |
| Joe   | 90 |
| Ken   | 80 |
 ------------

On the first line in E is

=QUERY(A2:B9,"select avg(B) group by A")

Things I'm confused about

  • Why are all the results on one line
  • Why did nothing get grouped/averaged

On E3 I just added A to see if that changed anything

On the last line, I specified that there was one header and used the whole table of data

enter image description here

1

There are 1 answers

0
Michael Kenworthy On

The issue here was that I didn't have the proper data-type selected for the cell contents...