Tag Info

New answers tagged

2

SELECT person, max(ct) AS max_ct FROM ( SELECT person, count(*) AS ct FROM ( SELECT person, result , row_number() OVER (PARTITION BY person ORDER BY time) - row_number() OVER (PARTITION BY person, result ORDER BY time) AS grp FROM tablex ) sub1 GROUP BY person, result, grp ) sub2 GROUP BY person ORDER ...



Top 50 recent answers are included