SELECT DISTINCT student.* FROM student RIGHT JOIN sc ON student.SId = sc.SId
SELECT
t1.SId,
t1.Sname,
t2.count,
t2.sum
FROM
student t1
LEFT JOIN ( SELECT SId, count( CId ) count, SUM( score ) sum FROM sc GROUP BY SId ) t2 ON t1.SId = t2.SId