title: What does PARTITION BY 1 mean?
body: <p>For a pair of cursors where the total number of rows in the resultset is required immediately after the first FETCH, ( after some trial-and-error ) I came up with the query below</p>
  
  <pre><code>SELECT
   col_a,
   col_b,
   col_c,
   COUNT(*) OVER( PARTITION BY 1 ) AS rows_in_result
  FROM 
   myTable JOIN theirTable ON
   myTable.col_a = theirTable.col_z
  GROUP BY
   col_a, col_b, col_c
  ORDER BY 
   col_b
  </code></pre>
  
  <p>Now when the output of the query is X rows, rows_in_result reflects this accurately.</p>
  
  <ul>
  <li>What does PARTITION BY 1 mean? 
  
  <ul>
  <li>I <em>think</em> it probably tells the database to partition the results into pieces of 1-row each</li>
  </ul></li>
  </ul>