- 2
- 0
- 约1.73千字
- 约 8页
- 2023-03-03 发布于广东
- 举报
数据库原理前百分之五十
实验环境:
create?table?t?(c?int);insert?into?t?values?(15),(7),(9),(10),(7),(8),(20),(16),(9),(19),(14),(10),(11),(10),(10),(12),(7),(10),(7),(9);commit;?
c 等于10,7,9的数量有? 11个,超过了半数。超过半数的 item信息。通用方式,不依赖具体数据库。
select t5.*,t6.*,ifnull(round(t5.sumtotal/t6.total,2),0) result from (
????select t3.rn,t3.total,t3.c,sum(ifnull(t4.total,0)) sumtotal from (
????????select
????????t1.*,
????????(
????????????select count(case when t2.totalt1.total then 1 when t2.total=t1.total and t2.ct1.c then 1 else null end)+1 from (
????????????????select c,count(*) total from t group by c
????????
您可能关注的文档
最近下载
- “我信息”,让沟通更有效.doc VIP
- 扬州大学825物理化学(理)2023年硕士考研真题.pdf VIP
- 设施设备巡检服务方案.docx VIP
- 变压器的标准设计流程(flyback变压器计算方法).xls VIP
- SFZ JD0300002-2018 数字声像资料提取与固定技术规范.pdf VIP
- 工业设备安装安全管理制度.docx
- 华东师大版数学八年级下册 期中测试 试卷 含答案.docx VIP
- GB_T 19494.2-2023 煤炭机械化采样 第2部分:煤样的制备.pdf VIP
- DL-T 1030-2006 煤的工业分析 自动仪器法.pdf VIP
- 2026广西北海浦港投资集团有限公司招聘20人考试备考试题及答案解析.docx VIP
原创力文档

文档评论(0)