mysql连接3个表并计数
Please look at this image
here is 3 tables , and out i want is
uid from table1
industry from table 3 of same uid
count of fid from table 2 of same uid
like in the sample example output will be 2 records
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我没有看到与表 1 有任何关系。下面是一个在两个表之间使用内部联接并按 uid 分组的示例:
I don't see any relation with table 1. Here's an example using an inner join between the two tables and grouping by the uid:
尝试这样做:
Table1 内部联接是无用的,但如果您需要检索城市或 mem_no,则可能有用;
在这种情况下,请记住也在 GROUP BY 子句中添加该字段。
Try with this:
Table1 inner join is useless but could be useful if you'll need to retrieve city or mem_no;
in this case, remember to add the field also in GROUP BY clause.