复杂的查询,很多连接
我已经为此奋斗了几个小时,希望你能给我一些新的见解。我有 6 个表,如下所示:
- 表 A
- 表 B,它是 A(一对多)的子
- 表 表 C,它是 B(一对多)的子表
表 D,它是一个A 的另一个子级(一对多)
表 E 是 D 的另一个父级,在一对[零或一]关系
- 表 F,它是 E 的另一个子级(一对多)
基本上我需要从 B 中选择一个字段,其中 C =
F。尝试过子查询、连接以及两者的组合,但还没有走得太远。任何想法将不胜感激。
I've been wrestling with this for a few hours and I'm hoping you can give me some fresh insight. I have 6 tables as follows:
- Table A
- Table B, which is a child of A (one-to-many)
- Table C, which is a child of B (one-to-many)
Table D, which is a another child of A (one-to-many)
Table E is another parent of D, in a one-to-[zero-or-one] relationship
- Table F, which is another child of E (one-to-many)
Basically I need to select a field from B where C = F.
I have tried with subqueries, joins, and a combination of both, but have not got too far. Any ideas would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您提供的信息,
如果这不是您所需要的,您可能需要发布一小部分数据以及所需的结果。
With the information you've presented, how about
If this is not what you need, you might want to post a small subset of data with the required results.