Given

```
 id |   date   | condition
-----------------------
  1 | 01/01/17 | true
  1 | 02/01/17 | false
  1 | 03/01/17 | true
  1 | 04/01/17 | true
  1 | 05/01/17 | false
  2 | 01/01/17 | false
  2 | 02/01/17 | true
  2 | 03/01/17 | true
  2 | 04/01/17 | false
  2 | 05/01/17 | false
  2 | 06/01/17 | true

```

I want to obtain

```
 id |   date   | condition |  rank  | 
-------------------------------------
  1 | 01/01/17 | true      |    1
  1 | 02/01/17 | false     |   null
  1 | 03/01/17 | true      |    2
  1 | 04/01/17 | true      |    3
  1 | 05/01/17 | false     |   null
  2 | 01/01/17 | false     |   null
  2 | 02/01/17 | true      |    1
  2 | 03/01/17 | true      |    2
  2 | 04/01/17 | false     |   null
  2 | 05/01/17 | false     |   null
  2 | 06/01/17 | true      |    3

```

How can I do this in postgresql?   

Is there a way to do this without union or join?   
 Ty