A
A
artem782017-03-10 15:13:40
Google Sheets
artem78, 2017-03-10 15:13:40

How to count entries in Google Sheets?

Google Sheets has a table like this:
e21ee06add704da5a9e7446e4e86b755.png
On another page, you need to display the number of records for each status. This method works in mysql, but in Google Sheets it gives an error.

=QUERY('trcklv лиды'!A1:G;"
  SELECT
    C, D, E,
    SUM(IF(F = 'lead', 1, 0)),
    SUM(IF(F = 'sale', 1, 0)),
    SUM(IF(F = 'trash', 1, 0)),
    SUM(G)
  GROUP BY C, D, E
")

Mistake:
Failed to interpret query string. Details: Parameter 2 in the QUERY:PARSE_ERROR function: Encountered "(" at line 4, column 23. Was expecting: ")" ...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Shultc, 2017-03-10
@Shultc

You need a COUNTIF function

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question