Home  >  Q&A  >  body text

mysql - 如何高效的识别出异地代充的设备

PHP中文网PHP中文网2719 days ago525

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 15:33:04

    Thanks for the invitation. Try using the find_in_set function

    SELECT id FROM table WHERE find_in_set('EC:XX', mac) OR find_in_set('DD:XX', mac);

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 15:33:04

    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.

    reply
    0
  • Cancelreply