当前位置:网站首页>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
边栏推荐
- iptables实现网络限制下ntp自定义端口同步时间
- 别把你的天使弄丢了
- 网页直接访问链接不让安全中心拦截
- [Structural Internal Power Cultivation] Structural Realization Stages (2)
- 【结构体内功修炼】结构体实现位段(二)
- [Untitled] Long-term recruitment of hardware engineers-Shenzhen Baoan
- [Repost] Marry a man must marry a man whose salary is at least 3571.4 yuan higher than yours
- 工程制图试题
- pnpm 是凭什么对 npm 和 yarn 降维打击的
- What is the connection and difference between software system testing and acceptance testing? Professional software testing solution recommendation
猜你喜欢
mySQL数据库初始化失败,有谁可以指导一下吗
MySQL database error The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid)
Detailed explanation of DNS query principle
How to make pictures clear in ps, self-study ps software photoshop2022, simple and fast use ps to make photos clearer and more textured
学习笔记14--机器学习在局部路径规划中的应用
Spark cluster deployment (third bullet)
【LeetCode】623. 在二叉树中增加一行
全面讲解GET 和 POST请求的本质区别是什么?原来我一直理解错了
接口全周期的生产力利器Apifox
Redis cache and existing problems--cache penetration, cache avalanche, cache breakdown and solutions
随机推荐
The Secrets of the Six-Year Team Leader | The Eight Most Important Soft Skills of Programmers
【结构体内功修炼】结构体实现位段(二)
Beautifully painted MM set
七夕给自己new一个chatRobot当对象
别把你的天使弄丢了
链表专项之环形链表
IT研发/开发流程规范效能的思考总结
Version number naming convention
8.4模拟赛总结
[Untitled] Long-term recruitment of hardware engineers-Shenzhen Baoan
Redis implements distributed lock-principle-detailed explanation of the problem
Codeforce 8.1-8.7做题记录
【每日一题】1403. 非递增顺序的最小子序列
MySQL database error The server quit without updating PID file (/var/lib/mysql/localhost.localdomain.pid)
DPU — 功能特性 — 安全系统的硬件卸载
版本号命名规则
路由----router
Ethernet Principle
iptables实现网络限制下ntp自定义端口同步时间
SQL SERVER关于主从表触发器设计