blob: d8a66f4d8bc00d06e07ffebada40c2f0ea77ffdd [file]
SELECT
employee_id,
position_id,
sub,
COUNT(*) OVER(PARTITION BY position_id ORDER BY sub RANGE BETWEEN CURRENT ROW AND CURRENT ROW) AS `count`
FROM
%s