migrate over clause from mssql to mysql How to write the following code into mysql,

    SELECT SUM(COUNT(col1)) over (PARTITION by col2) as summation
    FROM TABLE
    GROUP BY col2
The exact equivalent is:

SELECT COUNT(col1) as summation
FROM TABLE
GROUP BY col2


The SUM does nothing as there is only one aggregate based row per each partition of the OVER clause therefore it can be simplified to a simple GROUP BY instead.