I have this table:

```
declare @Table table (value int)
insert @Table select 0
insert @Table select 1
insert @Table select 1
insert @Table select 1
insert @Table select 0
insert @Table select 1
insert @Table select 1

```

Now, I need to make a Select query, which would add a column. This column will make a geometric sequence once there is a serie of value 1 in column value.

This would be the result:

[![enter image description here](https://i.stack.imgur.com/E17nh.png)](https://i.stack.imgur.com/E17nh.png)