当前位置:网站首页>sql server中 两表查询 平均数 分组
sql server中 两表查询 平均数 分组
2022-08-05 08:50:00 【CSDN问答】
问 35 36 如何实现
--35:查询每门课程的平均成绩,要求列出课程名和平均成绩。
select Course.Cname,AVG(SC.Grade) from Course,SC where SC.Cno=Course.Cno group by Course.Cname,SC.Grade
--36:查询每位学生的总成绩,要求列出学生名和总成绩。
select Student.Sname,sum(SC.Grade) from Student,SC where SC.Sno=Student.Sno group by SC.Grade,Student.Sname
边栏推荐
- Embedded practice ---- based on RT1170 transplant memtester to do SDRAM test (25)
- Fiddler tool explanation
- 今天是元宵节~~
- Linux导出数据库数据到硬盘
- What is a good movie to watch on Qixi Festival?Crawl movie ratings and save to csv file
- Chapter 12 贝叶斯网络
- 宝塔实测-搭建中小型民宿酒店管理源码
- Comprehensively explain what is the essential difference between GET and POST requests?Turns out I always misunderstood
- mySQL数据库初始化失败,有谁可以指导一下吗
- 数据源对象管理Druid和c3p0
猜你喜欢
Detailed explanation of DNS query principle
Fiddler工具讲解
Pagoda measurement - building small and medium-sized homestay hotel management source code
spark集群部署(第三弹)
[Structural Internal Power Cultivation] The Mystery of Enumeration and Union (3)
代码审计—PHP
Fiddler tool explanation
DataFrame insert row and column at specified position
DNS 查询原理详解
D2--FPGA SPI接口通信2022-08-03
随机推荐
工程制图试题
nn.unfold和nn.fold
版本号命名规则
Spark cluster deployment (third bullet)
软件系统测试和验收测试有什么联系与区别?专业软件测试方案推荐
EA谈单机游戏:仍是产品组合中极其重要的部分
How Entrepreneurs Attract Venture Capitalists
漂亮MM和普通MM的区别
ps怎么把图片变清晰,自学ps软件photoshop2022,简单快速用ps让照片更清晰更有质感
接口全周期的生产力利器Apifox
16种香饭做法全攻略
复现一次循环和两次循环
Thinking after writing a code with a very high CPU usage
DPU — 功能特性 — 网络系统的硬件卸载
NC20164 :最大数MAXNUMBER [线段树]
Version number naming convention
Pagoda measurement - building small and medium-sized homestay hotel management source code
How to make pictures clear in ps, self-study ps software photoshop2022, simple and fast use ps to make photos clearer and more textured
[转帖]嫁人一定要嫁工资至少比你高3571.4元的男士
别把你的天使弄丢了