
遇到一道sql语句查询的题,有看到会的帮解答一下,sql查询学生的学号和姓名,谢谢
select t1.sno,t1.sname,t2.cname from student t1
inner join sc t2 on t1.sno=t2.sno
where t1.sno like '2018%';
select t1.sname,count(1) from student t1
inner join sc t2 on t1.sno=t2.sno
where 1=1
group by t1.sname;
这样?