So, I've got this query that I'm passing to Google Sheets:
query = 'select A, SUM(C) GROUP BY A PIVOT B';
And that works perfectly, giving me a nice stacked bar chart. When I change it to this:
query = 'select A, SUM(C) GROUP BY A PIVOT B ORDER BY SUM(C) DESC';
it fails, and doesn't return any data (or an error, for that matter).
I've tried moving the ORDER BY into different positions, and the result is the same. Even if I leave off the "DESC" part, it fails. So, the bottom line is, without sorting = works great. With sorting = doesn't return any data and times out after a few seconds.
Is this a known bug, or am I doing something wrong?
Thanks!