Google Sheets Order By Help

21 views
Skip to first unread message

Del

unread,
Jan 25, 2019, 12:30:58 PM1/25/19
to Google Visualization API
I have the working query:  

=ArrayFormula(QUERY(C1:C&{"",""},"select Col1, count(Col2) where Col1 != '' group by Col1 label count(Col2) 'Count'",1))

I would like to order it by the count(Col2), but have been unable to figure out what I am doing wrong. I tried:
=ArrayFormula(QUERY(C1:C&{"",""},"select Col1, count(Col2) where Col1 != '' group by Col1 label count(Col2) 'Count' order by count(Col2) desc",1))

and I get:
ErrorUnable to parse query string for Function QUERY parameter 2: PARSE_ERROR: Encountered " "order" "order "" at line 1, column 83. Was expecting one of: <EOF> "format" ... "options" ... "," ...
Reply all
Reply to author
Forward
0 new messages