I am trying to create a simple query in my Google Sheet that will allow me to label the two columns it is outputting and sort the results based off of another column. However as soon as I add the Order By or the second Label command it throws and error. Here is my formula. Thanks for any help.
=query(A1:H,"SELECT H, SUM(G) WHERE H > '' AND G > 0 GROUP BY H ORDER BY A LABEL SUM(G) 'Sub Total', LABEL H 'Group Description'",0)