The original table:
The end result:
Tried many times, find out
Please, help me a look
CodePudding user response:
SELECT * FROM table1 the FROM mobile IN(SELECT mobile FROM table1 GROUP BY mobile HAVING COUNT (1) & gt; 2);
CodePudding user response:
Have done- 3. Select 2 mobile all records, according to mobile ascending order
SELECT * from test where mobile in
(
- 2. 1 the result is saved as a temporary table temp_t, screening and mobile repeat 3 times or more mobile
Select mobile from
(
- 1. According to the mobile, grouping name, namely the combination of mobile and name the only
SELECT * from the test GROUP BY mobile, name
) as temp_t GROUP BY mobile HAVING count (mobile) & gt;=3
) order by mobile asc
CodePudding user response: