使用 GROUP BY 检索满足条件的记录
我现在只想从几千条记录中选择计数大于 1 的行(换句话说,重复项),我大多看到 1 和一些 2 和 3,
SELECT count( * ) AS `Number` , GI . *
FROM `GeneralInformation` AS GI
GROUP BY `FirstName` , `Surname`
我该怎么做?
I'd like to only select the rows where the count is greater than 1 (in other words the duplicates) right now from a few thousand records I am mostly seeing 1s with a few 2s and 3s here and there
SELECT count( * ) AS `Number` , GI . *
FROM `GeneralInformation` AS GI
GROUP BY `FirstName` , `Surname`
how can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用having子句
Use the Having clause