SQL 这个题怎么做?

a)selectavg(price),typefrombookgroupbytypeB)a)selectavg(price),typefrombookgroupbypri... a)select avg(price),type from book group by type
B)a)select avg(price),type from book group by price
为什么?
展开
 我来答
古墩一下6
推荐于2016-01-19 · 超过56用户采纳过TA的回答
知道答主
回答量:113
采纳率:0%
帮助的人:135万
展开全部
有问题联系我2511837361

--1
select couno,couname from course
where course not in('004','007','013')
--2
select student.stuno,student.stuname from student
inner join stucou on student.stuno=stucou.stuno
inner join course on couse.couno=stucou.couno
--3
select avg(COUNT(student.stuno)) from student
inner join stucou on student.stuno=stucou.stuno
inner join course on couse.couno=stucou.couno
group by kind
--4
select classno,student.stuno,student.stuname,couname,tracher,schooltime from student
inner join stucou on student.stuno=stucou.stuno
inner join course on couse.couno=stucou.couno
inner join class on student.classno=class.classno
where classname='01电子商务'
--5
update course set schooltime='周二晚' from course
inner join stucou on course.cnuno=stucou.cnuno
inner join student on student.stuno=stucou.stuno
inner join class on class.classno=student.classno
where classname='01电子商务'
--6
alter table stucou
add constraint For_stuno foreign key(stuno) references student(stuno)
--7
create view myview
as
select MIN(COUNT(stuno)),MAX(MIN(COUNT(stuno))),AVG(MIN(COUNT(stuno)))
from student inner join class on student.classno=class.classno group by classno
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式