Uiney
Uiney
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Uiney的博客
全部文章
(共8篇)
题解 | 双重子查询
select cust_email from Customers where cust_id in ( select cust_id from Orders where order_num in ( select order_num from OrderItems where...
2023-04-08
0
174
题解 |
select cust_id,order_date from Orders where order_num in ( select order_num from OrderItems where prod_id = 'BR01' )
2023-04-08
0
182
题解 | #检索并列出已订购产品的清单#
select order_num,prod_id,quantity from OrderItems where (prod_id = 'BR01' or prod_id='BR02' or prod_id = 'BR03') and quantity >=100
2023-04-03
0
140
题解 | #浙大不同难度题目的正确率#
select difficult_level, avg(if(qpd.result="right",1,0)) as correct_rate #平均函数和if嵌套 from user_profile as u join question_practice_detail as qpd ...
2023-03-10
0
213
题解 | #统计复旦用户8月练题情况#
select u.device_id, u.university, sum(if(qpd.result is not null,1,0)) as question_cnt, #使用if函数最简洁 sum(if(qpd.result ='right',1,...
2023-03-10
0
193
题解 | #截取出年龄#
select substring_index(substring_index(profile,',',-2),',',1) as age,//使用两次字符串截取 count(device_id) as number from user_submit group by age
2023-03-10
0
165
题解 | #计算用户的平均次日留存率#
select count(distinct q2.device_id,q2.date)/count(distinct q1.device_id,q1.date) as avg_ret from question_practice_detail as q1 left join question_p...
2023-03-10
0
203
题解 | #统计每天总刷题数#
select `date` as 'days',sum(pass_count) as 'passCnt' from questions_pass_record_detail group by `date` 需要使用 `` 去重符号和数据库系统中的date进行区分
2023-03-01
4
326