码迷,mamicode.com
首页 > 其他好文 > 详细

如何找到计数表在不同的行吗

时间:2018-10-26 17:45:46      阅读:127      评论:0      收藏:0      [点我收藏+]

标签:name   错误   inner   数据   如何获取   join   school   code   不同的   

我想从两个不同的表一个表包含数据总学生另一个表包含特定的学生如何获取学生信息 我想显示name , code, totalstudent and no.of ngo student

select
a.name as name, a.school_code as CODE,
a.num_of_student as totalstudent,
b.COUNT (ngo_student_name) as total_student
from
ngo_student as a
INNER JOIN student_details as b on a.name=b.ngo_student_name
GROUP BY
b.ngo_student_name
请指导我该查询显示错误 谢谢

如何找到计数表在不同的行吗

标签:name   错误   inner   数据   如何获取   join   school   code   不同的   

原文地址:http://blog.51cto.com/14021402/2309468

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!