0
votes

I have a column that contains names and another that contains Survey Percent. Some names have multiple entries on survey percent and but what im trying to pull are those that doesn't have any entry at all(or those with Blank cells).I have tried =query(A1:B20, "select A, count(B) where count(B)=0 group by A", 1). This gives me the error:

Unable to parse query string for Function QUERY parameter 2: CANNOT_BE_IN_WHERE: COUNT

Link to sample data https://docs.google.com/spreadsheets/d/1yADZBAhGYs5cCPyPzaJ5e2QIOyltVbeKtn6QtQXMCjY/edit#gid=0

2

2 Answers

0
votes

Use nested queries.

  • The inner query to group by name
  • The outer query to filter only the groups which sum is null, because all the rows having the name are blanks.

Formula:

=query(query(A:B,"select A, SUM(B) where A <>'' group by A",1),"select Col1 where Col2 is null",1)

0
votes

COUNT indeed cannot be in WHERE. In standard SQL it can be inside the HAVING clause, co-occurring with GROUP BY.

What you want, however, can be had much more simply:

=unique(query(A1:B20, "select A where B is null", 1))