MySQL Query Algorithm - I am overwhelmed
问题 I have 2 different tables. My goal is to find people who use the same ip address with different (name and surname). Table 2 - members id name surname 87 john but 88 john but 89 alex lopez 90 david beckham Table 1 - logs member_id ip_adress 87 1.1.1.1 88 1.1.1.1 89 2.2.2.2 90 2.2.2.2 The result I want to get ip_address members count 2.2.2.2 89,90 total (2 ) I have been trying for days, we could not solve. As a result, I need to get the above output. 回答1: Here's a SQLFiddle for your schema with