设某教学数据库共包含如下三个关系,

设某教学数据库共包含如下三个关系,,第1张

(1)select * from sales where qty between 1000 and 10000(2)select gname,price,type,qty from goods,sales where goods.g#=sales.g# and fact='青岛海尔集团' and s# in(select s# from shops where sname='北京东方大厦') (3)select g# from (select g#,max(a.aqty) from (select g#,AVG(QTY) as aqty from sales group by g#) as a group by g#) as b 本来这题用top 做简单、但是考虑到有销售量相同的、还是用上面这个 (4)delete from sales where qty is null (5)create view S_VIEW as select * from shops where addr like '南京路%'

如果只是查询数据库原理这么课的最高分的话,

可以这样:Select max(sc.[score]) as 最高分 from sc where Cname in(Select Cname from Course where Cname='数据库原理')

也不知道行不行,很久没有写过了!!你试试吧!希望可以帮到您!


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/sjk/9992415.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2023-05-04
下一篇2023-05-04

发表评论

登录后才能评论

评论列表(0条)

    保存