选择的值堆栈我有这样的查询:它是更多钞票用MYSQL GROUP BY
SELECT email
FROM abc_table
GROUP BY email
HAVING (COUNT(email) > 1)
那么它将返回我:
email
[email protected]
[email protected]
[email protected]
,现在我需要调整查询得到的东西是这样的:
email id
[email protected] 1
[email protected] 2
[email protected] 3
[email protected] 4
[email protected] 5
[email protected] 6
它是更多钞票来得到这样的结果,通过使用GROUP BY HAVING?或者有什么建议可以得到这个结果?
非常感谢!
我猜你有一个更一行'([email protected],7)'什么地方? –
不知道你的表中有什么,样品没有意义。看起来你想删除'GROUP BY'? –