问题
答案
-- 第一题
select studentno, avg(english)
from mark;
-- 第二题
select studentno,math,address,telno
from cust
join mark on cust.studentno = mark.studentno
where studentno in(11,22,33,44,55);
-- 第三题
select name, computer
from cust
join mark on cust.studentno = mark.studentno
order by computer;
-- 第四题
select studentno, name, sum(english+math+computer) scoreAll
from cust
join mark on cust.studentno = mark.studentno
group by studentno
having scoreAll > 240
order by scoreAll desc;