sql列名不正确,怎么办?在线等!!!
selectcourse_id,sec_id,count(ID)fromsectionasajointakesasbon(a.course_id=b.course_ida...
select course_id,sec_id,count(ID)
from section as a join takes as b on (a.course_id=b.course_id and a.sec_id=b.sec_id and a.semester=b.semster and a.year=b.year)
where semester='Autumn' and year='2009'
group by course_id,sec_id 展开
from section as a join takes as b on (a.course_id=b.course_id and a.sec_id=b.sec_id and a.semester=b.semster and a.year=b.year)
where semester='Autumn' and year='2009'
group by course_id,sec_id 展开
展开全部
select course_id,sec_id,count(ID)
from section as a join takes as b on (a.course_id=b.course_id and a.sec_id=b.sec_id and a.semester=b.semster and a.year=b.year)
where a.semester='Autumn' and a.year='2009'
group by course_id,sec_id
这样试试
where semester='Autumn' and year='2009'
你这句两个表中都有相同字段,所以加个前缀试验一下
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询