有人可以帮助我使用 mysql 查询以使用 mysql 在临时表中显示每个组的重复项吗
sqlfiddle http://sqlfiddle.com/#!2/d8c9c/17
桌子
TOWN ID1
town1 1
town1 1
town1 4
town2 1
town2 5
town2 8
town3 1
town3 3
town3 3
所需结果
TOWN ID1
town1 1
town1 1
town3 3
town3 3
我试过 SELECT * FROM Table1 group by TOWN,ID1 但这会删除重复项并显示非重复记录