--union all用来合并两张表的查询结果集,一个表中的Id有多个记录,把所有这个id的记录查出来,并显示共有多少条记录数。
select '编号',s1.stu_id from student s1 union all
select '合计',to_char(count(s2.stu_id)) as count from student s2
--不允许有重复的数据
select s1.stu_name from student s1 union select s2.stu_name from student s2
--可以存在重复的数据
select s1.stu_name from student s1 union all select s2.stu_name from student s2
--如果a大于b,则输出a,否则b;如果b大于c,则输出b,否则输出c
select
(case when e.score_a > e.score_b then e.score_a else e.score_b end) as ab ,
(case when e.score_b > e.score_c then e.score_b else e.score_c end) as bc
from escore e
--查胜负
select s.s_date as d,
sum(case when s.s_content='胜' then 1 else 0 end) as 胜,
sum(case when s.s_content='负' then 1 else 0 end) as 负
from score s group by s.s_date
--查询成绩
select
(case when t.yw >=80 then '优秀' when t.yw>=60 then '及格' else '不及格' end ) as 语文,
(case when t.sx >=80 then '优秀' when t.sx>=60 then '及格' else '不及格' end ) as 数学,
(case when t.yy >=80 then '优秀' when t.yy>=60 then '及格' else '不及格' end ) as 英语
from scores t
--两张表联合查询分组
select t2.depname,
sum(case when t1.month='一月份' then t1.yj else 0 end) as 一月份,
sum(case when t1.month='二月份' then t1.yj else 0 end) as 二月份,
sum(case when t1.month='三月份' then t1.yj else 0 end) as 三月份
from table2 t2 left join table1 t1 on t1.depid= t2.id group by t2.depname
分享到:
相关推荐
【demx96】美容美甲类网站手机模板.zip
【图像去噪】基于matlab小波域双重局部维纳滤波图像去噪(含PSNR)【含Matlab源码 1642期】
【图像去噪】基于matlab自适应双边滤波SAR灰色图像去噪(含PNSR)【含Matlab源码 4232期】
小波变换遥感影像(高光谱和多波段)融合(含熵值 相关系数 光谱扭曲度 峰值信噪比)【含Matlab源码 4433期】.md
CSDN Matlab武动乾坤上传的资料均有对应的代码,代码均可运行,亲测可用,适合小白; 1、代码压缩包内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 图像修复: 维纳滤波、最小二乘、模糊图像复原、中值、均值图像恢复、全变分TV+curvelet变换图像修复、自适应空间滤波图像修复
【demx184】器材器械企业通用单独手机模板.zip
heatmap-2.2.1-cp37-cp37m-win_amd64.whl
CSDN Matlab武动乾坤上传的资料均有对应的代码,代码均可运行,亲测可用,适合小白; 1、代码压缩包内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 图像加密: DNA混沌图像加密、Arnold置乱图像加密解密、Logistic+Tent+Kent+Hent图像加密与解密、双随机相位编码光学图像加密解密 正交拉丁方置乱图像加密解密、RSA图像加密解密、小波变换DWT图像加密解密、混沌结合小波变换图像加密
小猿口算自动答题
内容概要:介绍了如何使用YOLOv5来构建手势识别系统,实现对0-9数字手势的精准识别与跟踪。本文档详述了系统的具体实现细节,从设置Python环境到数据集的准备、模型训练、导出成ONNX模型、性能测评与可视化图表绘制、直至构建图形化用户交互界面上的具体步骤,并附上了完整源代码和相关数据集供读者直接参考运用和拓展。文中涉及的技术工具包括:PyTorch用于训练YOLOv5模型、ONNX进行模型格式转换以便多平台部署、使用OpenCV处理视频输入识别动作姿势而Tkinter被选用为搭建应用程序图形用户界面,最后使用Matplotlib来进行各类评估指表图呈现。 适用人群:适合具有编程经验,从事机器学习研究和技术实施的工程人员以及对物体探测及计算机视觉有兴趣的人士。 使用场景及目标:适用于手势指令操控应用场合,帮助理解和应用最新的神经网络架构,如用于游戏控制器,无人机操控或者其他互动设备开发过程中,达到改善操作界面友好性与提升用户体验的目的。 额外说明:此外给出了进一步工作的改进建议以继续扩大此解决方案的应用边界。这不仅是一个教学资料也是一个可实用的研发项目样板。
【图像融合】基于matlab GUI水下图像融合【含Matlab源码 C015期】.md
scikits.vectorplot-0.1.1-pp38-pypy38_pp73-win_amd64.whl
mistune-0.8.4-py2.py3-none-any.whl
glcontext-2.3.5-cp310-cp310-win_amd64.whl
qimage2ndarray-1.3.1-cp36-cp36m-win_amd64.whl
CSDN Matlab武动乾坤上传的资料均有对应的代码,代码均可运行,亲测可用,适合小白; 1、代码压缩包内容 主函数:main.m; 调用函数:其他m文件;无需运行 运行结果效果图; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,私信博主; 3、运行操作步骤 步骤一:将所有文件放到Matlab的当前文件夹中; 步骤二:双击打开main.m文件; 步骤三:点击运行,等程序运行完得到结果; 4、仿真咨询 如需其他服务,可私信博主或扫描博客文章底部QQ名片; 4.1 博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 图像拼接:SIFT图像配准拼接
crcmod-1.7-cp39-cp39-win_amd64.whl
xxhash-1.4.3-cp35-cp35m-win_amd64.whl
psf-2021.6.6-cp311-cp311-win_amd64.whl
graphcanvas-4.1.0-py3-none-any.whl