我正在使用 partition by 来获取重复的行,并且此查询在 mysql5.7 中返回语法错误
select column1,ROW_NUMBER() OVER (PARTITION BY column2, column3 ORDER BY column2 DESC) as RowNumber
from tableA
错误:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(PARTITION BY column1, column2 ' at line 1
或任何其他查询
或任何其他查询仅返回重复的行(column2 和column 3 都包含相同的值repetivley),在这种情况下,输出将返回行1、3、5、6
谢谢你的帮助。