Search code examples
google-sheetsgoogle-sheets-formulacountinggoogle-sheets-querygoogle-query-language

How to do google sheet filtering?


https://docs.google.com/spreadsheets/d/e/2PACX-1vQ9j9EuHnvBPi_IYhheTbttwG-D5JHYcSGodSl3eSydEG1z5R7PFfKAOw6G-XrNEZQnxvDg_-5PmgDp/pubhtml

I have a google sheet like the above link it looks like this

Timestamp           Name

6/29/2020 23:32:42  aaaa

6/29/2020 23:32:50  aaaa

6/29/2020 23:32:54  aaaa

6/29/2020 23:33:00  bbbbb

6/29/2020 23:33:05  bbbbb

6/29/2020 23:33:10  bbbbb

6/29/2020 23:33:10  bbbbb

But I need to get/create an output like this

Name     NumberOfItem

aaaa         3

bbbbb        4

How can I do this on google sheet


Solution

  • try:

    =QUERY(B2:B; "select B,count(B) where B is not null group by B label count(B)''")