我正在尝试创建一个搜索结果的mysql脚本,同时过滤掉特定字段的重复项,我做了一些研究,我发现的代码格式如下:
SELECT * FROM sites s INNER JOIN (SELECT h.*, row_number() over (PARTITION by muleid) as seqnum from history h ) h WHERE acceptid=2;
但它出现了错误:
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 muleid) as seqnum from history h ) h WHERE acceptid=2' at line 1
有没有人可以提供帮助?