Count Number of Consecutive Occurrence of values in Table Count Number of Consecutive Occurrence of values in Table sql sql