title: How do you assert that the current row in WINDOW is the last row?
body: <p>If I have a query with a <code>ROW_NUMBER() OVER</code> how can I get output for total rows in this window, or, the last row as a boolean?</p>
  
  <p>I'd like to create two columns in the results with a boolean for both the first and last rows in the window.</p>
  
  <pre><code>A | ROW_NUMBER
  ---
  1 | 1
  2 | 1
  2 | 2
  3 | 1
  
  
  TO
  
  A | ROW_NUMBER | FIRST | LAST
  ---
  1 | 1 | 1 | 1
  2 | 1 | 1 | 0
  2 | 2 | 0 | 1
  3 | 1 | 1 | 1
  </code></pre>