当前位置:网站首页>MySQL null value processing and value replacement
MySQL null value processing and value replacement
2022-07-07 04:24:00 【Data analysis of financial Xiaobai】
SELECT user_profile.device_id,user_profile.university,IFNULL(B.question,0),IFNULL(B.RIGHT_QUESTION,0) FROM user_profile LEFT JOIN (
SELECT device_id, COUNT(*) AS question,sum((case when result='right' then 1 else 0 end)) as RIGHT_QUESTION
FROM question_practice_detail WHERE month(date)=8 GROUP BY device_id)
AS B ON user_profile.device_id=B.device_id WHERE user_profile.university=" Fudan University "
Comprehensive operation
SELECT difficult_level,sum(ar)/count(*) AS RATE FROM
(
select IF(result="right",1,0) as ar,device_id,difficult_level FROM question_practice_detail LEFT JOIN question_detail
on question_practice_detail.question_id=question_detail.question_id
)
a
WHERE device_id IN (select device_id from user_profile where university=' Zhejiang University ')
GROUP BY difficult_level ORDER BY RATE
边栏推荐
- 2022 electrician cup a question high proportion wind power system energy storage operation and configuration analysis ideas
- 使用Thread类和Runnable接口实现多线程的区别
- [team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp
- Redis source code learning (30), dictionary learning, dict.h
- [knife-4j quickly build swagger]
- Operational amplifier application summary 1
- 如何编写一个程序猿另一个面试官眼前一亮的简历[通俗易懂]
- 2022中青杯C题城市交通思路分析
- How to write a resume that shines in front of another interviewer [easy to understand]
- Food Chem|深度学习根据成分声明准确预测食品类别和营养成分
猜你喜欢
![[coded font series] opendyslexic font](/img/5e/e1512ffe494b5d0e7d6d6765644126.png)
[coded font series] opendyslexic font

科兴与香港大学临床试验中心研究团队和香港港怡医院合作,在中国香港启动奥密克戎特异性灭活疫苗加强剂临床试验

各路行业大佬称赞的跨架构开发“神器”,你get同款了吗?

Antd comment recursive loop comment

Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
![[record of question brushing] 2 Add two numbers](/img/3b/f8fec79dc2b5088ac57f8d7a18aea6.png)
[record of question brushing] 2 Add two numbers

CUDA Programming
![[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp](/img/eb/9aed3bbbd5b6ec044ec5542297f3c6.jpg)
[team learning] [phase 34] Baidu PaddlePaddle AI talent Creation Camp

EasyCVR平台接入RTMP协议,接口调用提示获取录像错误该如何解决?

MySQL data loss, analyze binlog log file
随机推荐
Kotlin Compose Text支持两种颜色
The easycvr platform is connected to the RTMP protocol, and the interface call prompts how to solve the error of obtaining video recording?
leetcode 53. Maximum Subarray 最大子数组和(中等)
Storage of data
Mysql-数据丢失,分析binlog日志文件
Hardware development notes (10): basic process of hardware development, making a USB to RS232 module (9): create ch340g/max232 package library sop-16 and associate principle primitive devices
Implementation of binary search tree
Highly paid programmers & interview questions. Are you familiar with the redis cluster principle of series 120? How to ensure the high availability of redis (Part 1)?
超越Postman,新一代国产调试工具Apifox,用起来够优雅
[system management] clear the icon cache of deleted programs in the taskbar
[on automation experience] the growth path of automated testing
kivy教程之设置窗体大小和背景(教程含源码)
Mathematical analysis_ Notes_ Chapter 10: integral with parameters
中青杯2022A题高校数学建模竞赛与课程教育思路分析
Win11远程桌面连接怎么打开?Win11远程桌面连接的五种方法
Some thoughts on cross end development of kbone and applet
NanopiNEO使用开发过程记录
各路行业大佬称赞的跨架构开发“神器”,你get同款了吗?
Restore backup data on GCS with br
Video fusion cloud platform easycvr video Plaza left column list style optimization