获取具有相同值的行
这是我的表格,其中包含公寓业主、公寓所在房屋的号码等信息。 同一公寓的业主可以是两个不同的人,因为这是负责列“分数”,它显示了一个人拥有公寓的某一部分。
我的任务是显示一套公寓由两个人拥有的所有信息?
因此,结果我应该得到 14 号门牌号的 9 号公寓
This is my table in which the information about the owner of the apartment, the number of the house in which the apartment is located, etc.
The owners of the same apartment can be two different people, for this is responsible column Fraction, which shows a certain part of the apartment owned by a person.
My task is to display all the information if one apartment is owned by two people?
Accordingly, as a result, I should get apartment number 9 in house number 14
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您想要:
上述逻辑将检测到任何拥有多个唯一所有者的房屋和公寓。
I think you want:
The above logic will detect anyone house and apartment having more than one unique owner.
这对我有用:
请参阅此 db<>fiddle 并参考对于这个问题:
IN 子句中的 MySQL 多列
This works for me:
See this db<>fiddle and also refer to this SO question:
MySQL multiple columns in IN clause