日期:2014-05-18 浏览次数:20478 次
select course_number ,count(*) as cnt,sum(online_time) as totaltime from stu_study where stu_number='20110012' group by course_number
------解决方案--------------------
把where 写着group by 前面
------解决方案--------------------
select course_number ,count(*) as cnt,sum(online_time) as totaltime from stu_study
where stu_number='20110012'
group by course_number
where必须在group by前面