Tables are unordered set so you need a column to indicate sorting(id, update_time, ...). Once you have it you could use windowed functions:
WITH cte AS (
SELECT *,ROW_NUMBER() OVER(ORDER BY id)-ROW_NUMBER() OVER(PARTITION BY data_suites ORDER BY id) grp
FROM my_table
)
SELECT COUNT(*) cnt
FROM cte
WHERE data_suites = 1
GROUP BY grp
ORDER BY cnt DESC LIMIT 1;
-- answer 6
db<>fiddle demo
WITH cte AS (
SELECT *, ROW_NUMBER() OVER(ORDER BY id) - ROW_NUMBER() OVER(PARTITION BY data_suites ORDER BY id) grp
FROM my_table
)
SELECT grp,MIN(id) AS start, MAX(id) AS end, COUNT(*) cnt
FROM cte
WHERE data_suites = 1
GROUP BY grp;
db<>fiddle demo2
Output:
+------+--------+------+-----+
| grp | start | end | cnt |
+------+--------+------+-----+
| 2 | 3 | 5 | 3 |
| 3 | 7 | 10 | 4 |
| 4 | 12 | 17 | 6 |
+------+--------+------+-----+