用相关子查询实现 ,使用派生表实现。
select sno 学号,cname 课程名,grade 成绩
from cou,sc a
where cou.cno = a.cno and
(a.grade > (select avg(b.grade) from sc b where a.sno = b.sno))
查询在两种或两种以上PC机上出现的硬盘容量
select hd
from pc
group by hd
having count(*)>=2
C2-3根据运费调整订单单价
update orderdetails
set UnitPrice=UnitPrice*1.15
where OrderID in(
select OrderID
from orders
where Freight>30)