当前位置: 首页 > news >正文

SQL140 未完成率top50%用户近三个月答卷情况

SQL140 未完成率top50%用户近三个月答卷情况 

# 请统计SQL试卷上未完成率较高的50%用户(对所有用户的完成率进行排序,找出完成率排名小于等于 50% 的用户)中,
# 6级和7级用户在有试卷作答记录的近三个月中,每个月的答卷数目和完成数目。
# 按用户ID、月份升序排序。
withtemp1 as (selectuser_info.uid,count(if(submit_time is null, 1, null)) / count(*) as incomplete_ratefromexam_recordjoin user_info using (uid)whereexam_id in (selectexam_idfromexamination_infowheretag = 'SQL')group byuidorder byuid desc),temp2 as (selectuid,incomplete_rate,percent_rank() over (order byincomplete_rate desc) as prfromtemp1order bypr),temp3 as (selectuid,date_format(start_time, "%Y%m") as start_month,count(start_time) as total_cnt,count(submit_time) as complete_cntfromexam_recordjoin user_info using (uid)whereuid in (selectuidfromtemp2wherepr <= 0.5)and uid in (selectuidfromuser_infowherelevel in (6, 7))group byuid,date_format(start_time, "%Y%m"))
selectuid,start_month,total_cnt,complete_cnt
from(selectuid,start_month,total_cnt,complete_cnt,rank() over (partition byuidorder bystart_month desc) as rkfromtemp3) as t1
whererk <= 3
order byuid,start_month

http://www.dtcms.com/a/277500.html

相关文章:

  • react中为啥使用剪头函数
  • (nice!!!)(LeetCode 面试经典 150 题 ) 30. 串联所有单词的子串 (哈希表+字符串+滑动窗口)
  • win10 离线安装wsl
  • 论文翻译:Falcon: A Remote Sensing Vision-Language Foundation Model
  • 26-计组-数据通路
  • 楼宇自动化:Modbus 在暖通空调(HVAC)中的节能控制(一)
  • Linux驱动开发1:设备驱动模块加载与卸载
  • java+vue+SpringBoo中小型制造企业质量管理系统(程序+数据库+报告+部署教程+答辩指导)
  • 查看Linux服务器显卡使用情况的详细教程
  • win11添加无线显示器(两个笔记本实现双屏)
  • 昇腾FAQ-A08-工具链相关
  • 小架构step系列13:测试用例的加载
  • 线性代数学习笔记
  • 求解线性规划模型最优解
  • Java行为型模式---观察者模式
  • AI基础设施展望
  • 《Mirage:首款基于实时世界模型的AI原生UGC游戏引擎,开启“边玩边生成”的游戏新时代》
  • Python实现小红书悬停框效果详解
  • 极矢量与轴矢量
  • 框架和库的区别
  • MCP4725 数据手册解读
  • 通信子网 V
  • cuda编程笔记(7)--多GPU上的CUDA
  • 黑马点评系类问题p63中ClassPathResource报错
  • Claude Code AI 编程指南
  • 在 Flow 取消时自动清理资源
  • 构建可落地的企业AI Agent,背后隐藏着怎样的技术密码?
  • vue是什么
  • 【读书笔记】《Effective Modern C++》第二章:auto
  • 改进后的 OpenCV 5.x + GStreamer + Python 3.12 编译流程(适用于 Orange Pi / ARM64)