首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
牛客247795715号
获赞
4
粉丝
0
关注
5
看过 TA
28
门头沟学院
2024
数据分析师
IP属地:广东
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑牛客247795715号吗?
发布(14)
评论
刷题
收藏
牛客247795715号
关注TA,不错过内容更新
关注
2023-08-24 20:23
门头沟学院 数据分析师
题解 | #创建一张新表# 保证编码不乱码
create table if not exists user_info_vip (id int(11) primary key auto_increment not null comment '自增ID', uid int(11) unique not null comment '用户ID', nick_name varchar(64) comment '昵称', achievement int(11) default 0 comment '成就值', level int(11) comment '用户等级', job varchar(32) comment '职业方向', registe...
0
点赞
评论
收藏
分享
2023-08-24 19:39
门头沟学院 数据分析师
题解 | #插入记录(三)#
replace into examination_info values(null,9003,'SQL','hard','90','2021-01-01 00:00:00') replace into 是带更新的插入,如果原本表中有数据的话,这个raplace into 会直接更新表中数据
0
点赞
评论
收藏
分享
2023-08-24 19:31
门头沟学院 数据分析师
题解 | #插入记录(二)# 将一张表的值复制到另外一张表
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 YEAR(submit_time) < '2021'
0
点赞
评论
收藏
分享
2023-08-19 09:54
门头沟学院 数据分析师
题解 | #顾客登录名#
select cust_id,cust_name,upper(concat(substring(cust_name,1,2),substring(cust_city,1,3))) AS user_login from Customers # substring 截取字符串 (截取的字符串,起始位置,截取的个数)
0
点赞
评论
收藏
分享
2023-08-18 16:27
门头沟学院 数据分析师
题解 | #检索产品名称和描述(一)#
select prod_name,prod_desc from Products where prod_desc regexp 'toy' # regexp'toy' 不加^和$ 表示包含这个toy内容
0
点赞
评论
收藏
分享
2023-07-29 14:12
门头沟学院 数据分析师
题解 | #多行输出#
str1 = 'Hello World!' str2 = 'Hello Nowcoder!' print(str1,str2,sep='\n') # sep输除两字符之间的间隙
0
点赞
评论
收藏
分享
2023-05-14 20:23
门头沟学院 数据分析师
2023-05-14
在牛客打卡2天,今天学习:刷题 7 道/代码提交 12 次
0
点赞
评论
收藏
分享
2023-05-13 18:30
门头沟学院 数据分析师
题解 | #插入记录(二)#自增ID不用插入
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 YEAR(submit_time) < '2021'
0
点赞
评论
收藏
分享
2023-05-11 20:56
门头沟学院 数据分析师
题解 | #顾客登录名#
SELECT cust_id,cust_name, upper(concat(substring(cust_name,1,2),substring(cust_city,1,3))) AS user_login FROM Customers /*substring(截取的字符串,起始位置,终止位置) 和substringindex(截取的字符串,以什么来截取,截取到哪个位置) concat(字符串1,2)*/
0
点赞
评论
收藏
分享
2023-05-11 20:21
门头沟学院 数据分析师
题解 | #检索产品名称和描述(一)#
SELECT prod_name,prod_desc FROM Products WHERE prod_desc LIKE '%toy%' %是通配符 表示0个或0个以上的字符
0
点赞
评论
收藏
分享
2023-05-11 19:28
门头沟学院 数据分析师
2023-05-11
在牛客打卡1天,今天学习:刷题 6 道/代码提交 14 次
0
点赞
评论
收藏
分享
2023-05-10 18:16
门头沟学院 数据分析师
题解 | #查找山东大学或者性别为男生的信息#
SELECT device_id,gender,age,gpa FROM user_profile WHERE university = '山东大学' UNION ALL SELECT device_id,gender,age,gpa FROM user_profile WHERE gender = 'male'
0
点赞
评论
收藏
分享
2023-05-09 22:28
门头沟学院 数据分析师
题解 | #查询结果限制返回行数#限制用LIMIT关键字
SELECT device_id FROM user_profile Limit 2;
0
点赞
评论
收藏
分享
2023-05-09 22:20
门头沟学院 数据分析师
题解 | #查询结果去重#
SELECT DISTINCT university FROM user_profile;
0
点赞
评论
收藏
分享
1
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客企业服务