title: dense_rank over boolean column
body: <p>Good day. I have a permutated table with condition and I am running redshift DB. This is a table with events log and I splitted it into session start (bool = 1) and session continue (bool = 0) like this:</p>
  <pre><code>=======================
  | ID    |  BOOL      |
  =======================
  |  1    |      0     |
  |  2    |      1     | 
  |  3    |      0     |
  |  4    |      0     |
  |  5    |      0     |
  |  6    |      0     |
  |  7    |      0     |
  |  8    |      0     |
  |  9    |      0     |
  |  10   |      0     |
  |  11   |      1     | 
  |  12   |      0     |
  |  13   |      0     |
  |  14   |      1     |
  |  15   |      0     |
  |  16   |      0     |
  =======================
  </code></pre>
  <p>I need to create sesssion_id column with something like dense_rank:</p>
  <pre><code>================================
  | ID    |  BOOL      |  D_RANK |
  ================================
  |  1    |      0     |    1    |
  |  2    |      1     |    2    | 
  |  3    |      0     |    2    |
  |  4    |      0     |    2    |
  |  5    |      0     |    2    |
  |  6    |      0     |    2    |
  |  7    |      0     |    2    |
  |  8    |      0     |    2    |
  |  9    |      0     |    2    |
  |  10   |      0     |    2    |
  |  11   |      1     |    3    |
  |  12   |      0     |    3    |
  |  13   |      0     |    3    |
  |  14   |      1     |    4    |
  |  15   |      0     |    4    |
  |  16   |      0     |    4    |
  ================================
  </code></pre>
  <p>Is there any option to do this? Would appreciate any help.</p>