tujin
tujin
全部文章
分类
归档
标签
去牛客网
登录
/
注册
tujin的博客
全部文章
(共25篇)
题解 | #牛客直播各科目同时在线人数#
select b.course_id,ct.course_name,max(uv) as max_num from ( select course_id,timestamp, sum(uv) over(partition by course_id order by timestamp) as uv ...
2023-10-03
0
281
题解 | #删除表#
drop table if exists exam_record_2011; drop table if exists exam_record_2012; drop table if exists exam_record_2013; drop table if exists exam_record_...
2023-09-30
0
175
题解 | #修改表#
ALTER TABLE user_info ADD column school varchar(15) AFTER LEVEL; ALTER table user_info CHANGE column job profession varchar(10); ALTER TABLE user_info...
2023-09-30
0
239
题解 | #删除记录(三)#
truncate table nowcoder_exam_record; 方法一、truncate情况表中的记录并重置自增id。[使用]:truncate table[注意]:truncate只能作用于表;truncate会清空表中的所有行,但表结构及其约束、索引等保持不变;truncate会重置表...
2023-09-30
0
340
题解 | #删除记录(二)#
delete from exam_record where submit_time is null or timestampdiff(minute, start_time, submit_time) < 5 order by start_time limit 3 在得到满足条件后,再去求得前...
2023-09-30
0
212
题解 | #删除记录(一)#
delete from exam_record where submit_time<date_sub(start_time,interval -5 minute) and score < 60; 在涉及到时间计算时,可以转时间戳,也可以直接使用interval进行计算。
2023-09-30
0
173
题解 | #插入记录(三)#
REPLACE INTO examination_info VALUES(NULL,9003,'SQL','hard',90,'2021-01-01 00:00:00'); 关键字NULL可以用DEFAULT替代。掌握replace into···values的用法replace into 跟 in...
2023-09-29
0
207
题解 | #插入记录(二)#
insert into exam_record_before_2021(uid,exam_id,start_time,submit_time,score) select uid,exam_id,start_time,submit_time,score from exam_record where Y...
2023-09-29
0
201
题解 | #列出供应商及其可供产品的数量#
select Vendors.vend_id,cast(sum(if(Products.prod_id is null,0,1)) AS UNSIGNED) as prod_id from Vendors left join Products on Vendors.vend_id = Product...
2023-09-29
0
211
题解 | #21年8月份练题总数#
select count(distinct device_id) as did_cnt,count(question_id) as question_cnt from question_practice_detail where Year(date) = '2021' and month(date)...
2023-09-26
0
153
首页
上一页
1
2
3
下一页
末页