Tencent飞
Tencent飞
全部文章
分类
题解(40)
归档
标签
去牛客网
登录
/
注册
Tencent飞的博客
全部文章
(共40篇)
题解 | #SQL类别高难度试卷得分的截断平均值#
SELECT e.tag, e.difficulty, round( (SUM(er.score) - max(er.score) - min(er.score)) / (count(er.score) - 2), 1) as clip_avg_score from examination_inf...
Mysql
2022-03-12
0
339
题解 | #更新记录(二)#
# 2021年9月1日之前开始作答的未完成记录 => 抽象出来就是开始作答时间在2021年9月1日之前且有作答,也就是有分数,只是没有完成整张试卷而已 UPDATE exam_record set score = 0 , submit_time = '2099-01-01 00:00:00' ...
Mysql
2022-03-12
0
387
题解 | #更新记录(一)#
update examination_info set tag = replace(tag, 'PYTHON', 'Python') where tag = 'PYTHON'
Mysql
2022-03-12
0
326
题解 | #插入记录(三)#
# 这个表有主键,可以用replace into # replace into examination_info (id, exam_id,tag, difficulty, duration, release_time) # values (NULL, 9003, 'SQL', 'hard', 90...
Mysql
2022-03-12
0
335
题解 | #纠错4#
SELECT cust_name, cust_contact, cust_email FROM Customers WHERE cust_state = 'MI' UNION SELECT cust_name, cust_contact, cust_email FROM Customers...
Mysql
2022-03-11
0
303
题解 | #组合 Products 表中的产品名称和 Customers 表中的顾客名称#
select p1.prod_name from Products p1 union all select c.cust_name as prod_name from Customers c order by prod_name
Mysql
2022-03-11
0
340
题解 | #将两个 SELECT 语句结合起来(二)#
select o1.prod_id, o1.quantity from OrderItems o1 where o1.quantity=100 union select o2.prod_id,o2.quantity from OrderItems o2 where o2.prod_id like ...
Mysql
2022-03-11
0
306
题解 | #将两个 SELECT 语句结合起来(一)#
select o1.prod_id, o1.quantity from OrderItems o1 where o1.quantity=100 union select o2.prod_id,o2.quantity from OrderItems o2 where o2.prod_id like ...
Mysql
2022-03-11
0
311
题解 | #列出供应商及其可供产品的数量#
SELECT v.vend_id, COUNT(p.vend_id) as prod_id FROM Vendors v left join Products p on v.vend_id = p.vend_id group by v.vend_id order by v.vend_id asc;
Mysql
2022-03-11
0
252
题解 | #返回产品名称和每一项产品的总订单数#
select p.prod_name , count(o.order_num) as orders from Products p left join OrderItems o on p.prod_id = o.prod_id group by prod_name order by p.prod_n...
Mysql
2022-03-11
0
265
首页
上一页
1
2
3
4
下一页
末页