My target is to get the values from the Count column.
From June 1st until June 10th the QUALTITY_FLAG is 1 -> this is 10 days in row,
from 11th until 13th the flag is 0 -> this is 3 days in row.
from 14th until 19th the flag is 1 -> this is 6 days in row.

Result should be something like

OUTLET_IDQUALITY_FLAGCount
799 1 10
799 0 3
799 1 6

I tried the stuff with OLAP functions like COUNT(...) OVER (PARTITON BY …. ROWS BETWEEN…) but this was not the answer.