Why are you using SELECT *?
If you want to see the entire record from all records with
duplicate IPs,
you'll need a subquery.
It will look something like this:
SELECT A.Record, A.User_IP, A.User_Join_Date, [anything else
you want to see
for this task]
FROM database.members A
INNER JOIN (SELECT User_IP FROM database.members GROUP BY
UserIP HAVING
COUNT(*) > 1) AS A_Dups ON A.User_IP = A_Dups.User_IP
ORDER BY A.User_IP, A.User_Join_Date
I didn't see anything from your groups table in the results
you wanted, so I
left it out.
Above, you're joining your members to a derived table that
contains a list
of all IPs that are duplicated. That means the resulting join
gives you all
records that have an IP duplicated in some other record. The
ORDER BY then
puts them in the order you wanted - all the IPs together with
the oldest
record first.
Hope that helps.