I have a table like this:

```
Store_Id | Week 
---------+--------
   A1    | 201601
   A1    | 201602
   A1    | 201604
   A1    | 201606
   A1    | 201607
   A2    | 201552
   A2    | 201603
   A2    | 201604
   A2    | 201605
   A2    | 201608

```

I need to derive a dynamic week column next to this which will be ideally looking like this:

```
Store_Id | Week   | Dynamic_Week
---------+--------+-------------
   A1    | 201602 |    1
   A1    | 201603 |    2
   A1    | 201605 |    4
   A1    | 201606 |    5
   A1    | 201607 |    6
   A2    | 201552 |    1
   A2    | 201603 |    4
   A2    | 201604 |    5
   A2    | 201605 |    6
   A2    | 201608 |    9

```

The logic is: the MIN(Week) for each store is considered as the first week of sales for the corresponding store. The preceding values in the dynamic week will be incremented based on the reference of the first week of sales on each store.

I tried `Row_Number()`, `RANK()`, `DENSE_RANK()`, but couldn't get a solution that's needed. All the three things didn't work. 

Can anyone suggest me with possible solution.

Thanks in advance.