I try to count occurrences of a cell content (column2 - values aa, bb, cc) related to url (column1 - values url1, url2, etc.). Columns are long (a few thousands rows).
I want to group content by url, pivot by column 2. I try to use query formula for this but I do something wrong. I made a dummy sheet with source table and desired effect. There's also my formula that returns error.
=query(B2:C,"select B, count(C) where B is not null group by B pivot C",0)
How can I get desired result using QUERY?
Note: I know how to do it different way but I want to learn more about Query.
You can play in this file: https://docs.google.com/spreadsheets/d/1dNIjfK253gEA0v7zpdeuubOUX8BHg1R3wKnvYe544Eg/copy
I checked also Query language reference but it did not help: https://developers.google.com/chart/interactive/docs/querylanguage#overview