ITPub博客

首页 > IT职业 > IT生活 > 如何找到计数表在不同的行吗

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

原创 IT生活 作者:a1107849370 时间:2018-10-26 16:45:57 0 删除 编辑

我想从两个不同的表一个表包含数据总学生另一个表包含特定的学生如何获取学生信息 我想显示 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

请指导我该查询显示错误 谢谢


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31559515/viewspace-2217694/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-10-24

  • 博文量
    70
  • 访问量
    70312