表结构(id,create-date,mobileno)
样本数据
(1,2018-01-01,9999999999)
(2,2018-01-01,9999999999)
(3,2018-01-01,9999999999)
(4,2018-01-02,8888888888)
(5,2018-01-03,7777777777)
(6,2018-01-03,7777777777)
所需的输出列表
答案 0 :(得分:1)
我认为您只想按查询进行基本分组:
SELECT mobileno, COUNT(*) AS num_occurrences
FROM yourTable
GROUP BY mobileno
HAVING COUNT(*) > 2;