title: Google Sheets Nested Query with Aggregate Function
body: <p>I am trying to use the COUNT() function inside a nested query for Google Sheets. Here is the query I am using: <code>=query('Salary Data'!B3:J35000, &quot;SELECT '&quot;&amp;query('Salary Data'!B3:J35000, &quot;SELECT COUNT(E) WHERE E &gt;= 1000000&quot;)&amp;&quot;', COUNT(E) WHERE E &gt;=900000 AND E &lt; 1000000&quot;)</code></p>
  <p>The query outputs 'count' for the result of the nested query instead of the count of salaries &gt;= 1000000. How do I get the actual count from the subquery?</p>
  <p>EDIT: It seems the subquery only returns the name of the aggregate function used, whether it is count, max, min, avg, etc.</p>