Answer the question
In order to leave comments, you need to log in
MySQL, query, same values?
There is a table 'orders', type:
id | coords
------------
1 | 15
2 | 15
3 | 1
4 | 15
5 | 8
You need to display lines with the same values and id, ie in this case:
1 | 15
2 | 15
4 | 15
When using GROUP BY, id collapse
Answer the question
In order to leave comments, you need to log in
select id, coords from orders join (
select coords from orders group by coords having count(0)>1
) nonuniqcoords using(coords)
Maybe not quite the right solution, but still:
Other solutions:
stackoverflow.com/questions/688549/finding-duplicate...
stackoverflow.com/questions/854128/find-duplicate-...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question