I have a table like this:
// mytable
+----+--------------------------+---------------+-----------------+
| id | Email | IP | cookies |
+----+--------------------------+---------------+-----------------+
| 1 | [email protected] | 172.95.65.7 | 5c6ffbdd40d95 |
| 2 | [email protected] | 84.15.2.4 | 26b73a21e63c3 |
| 3 | [email protected] | 124.54.32.1 | e0e904b73a2fe |
| 4 | [email protected] | 172.95.65.7 | 5c6ffbdd40d95 |
| 5 | [email protected] | 56.23.41.3 | b23a51a63edf4 |
| 6 | [email protected] | 84.15.2.4 | 26b73a21e63c3 |
+----+--------------------------+---------------+-----------------+
Now I want to select both first and fourth rows. Because they have identical IP, identical Cookies and different Email. How can I just select them?
I want this output:
// newmytable
+----+--------------------------+---------------+-----------------+
| id | Email | IP | cookies |
+----+--------------------------+---------------+-----------------+
| 1 | [email protected] | 172.95.65.7 | 5c6ffbdd40d95 |
| 4 | [email protected] | 172.95.65.7 | 5c6ffbdd40d95 |
+----+--------------------------+---------------+-----------------+
172.95.65.7and172.95.65.7are identical.