SELECT mac FROM (
SELECT DISTINCT mac, username FROM ORDER
) AS tmp
GROUP BY mac
having count(1) > 1
I don’t know if there are any writing errors. There is no test, but I guess the performance will not be very good. After all, it involves the disintct and group by operations.
Thanks for the invitation. Try using the
find_in_set
functionI don’t know if there are any writing errors. There is no test, but I guess the performance will not be very good. After all, it involves the
disintct
andgroup by
operations.