且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MySQL INNER JOIN语法

更新时间:2023-10-23 14:36:58

此查询将返回所有名称(名字和姓氏)的列表,其中包含重复的地址.这部分

This query will return a list of all names (first and last name), which contain a duplicate address. This part

SELECT address FROM list 
GROUP BY address HAVING count(id) > 1

获取表中多次出现的所有地址的列表,然后将其联接回表本身,以返回具有相同地址的所有名称.这将返回一个列表,列出所有与一个以上名称相关联的唯一地址,以及与该地址一起显示的名称.

Gets a list of all the addresses that occur more than once in the table, This is then joined back to the table itself, to return all names which have the same address. This should return a list of all the unique address which have more than 1 name associated with them, along with the names that go along with the addresses.