SQL面试题——抖音SQL面试题 共同问题—共同使用ip用户检测问题
共同使用ip用户检测问题
现有用户登录日志表,记录了每个用户登录的IP地址,请查询共同使用过3个及以上IP的用户对;
+---+--------------+-------------------+
| id| ip| etime|
+---+--------------+-------------------+
| 2|223.104.41.101|2023-08-24 07:00:00|
| 4|223.104.41.122|2023-08-24 10:00:00|
| 5|223.104.41.126|2023-08-24 11:00:00|
| 4|223.104.41.126|2023-08-24 13:00:00|
| 1|223.104.41.101|2023-08-24 16:00:00|
| 3|223.104.41.101|2023-08-24 16:02:00|
| 2|223.104.41.104|2023-08-24 16:30:00|
| 1|223.104.41.121|2023-08-24 17:00:00|
| 2|223.104.41.122|2023-08-24 17:05:00|
| 3|223.104.41.103|2023-08-24 18:11:00|
| 2|223.104.41.103|2023-08-24 19:00:00|
| 1|223.104.41.104|2023-08-24 19:00:00|
| 3|223.104.41.122|2023-08