首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
课程
专栏·文章
竞赛
搜索
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
在线笔面试、雇主品牌宣传
登录
/
注册
牛客843678496号
获赞
32
粉丝
4
关注
0
看过 TA
210
武汉大学
2023
3D设计师
IP属地:湖北
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑牛客843678496号吗?
发布(53)
刷题
牛客843678496号
2023-03-10 16:21
3D设计师
题解 | #分别满足两个活动的人#
select uid, 'activity1' as activity from exam_record where year (submit_time) = 2021 group by uid having min(score) >= 85 union all select distinct uid, 'activity2' as activity from exam_record as e_r join examination_info as e_i on e_r.exam_id = e_i.exam_i...
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-09 17:05
3D设计师
题解 | #作答试卷得分大于过80的人的用户等级分布#
select level, count(ui.uid) as level_cnt from exam_record as er join examination_info as ei on er.exam_id = ei.exam_id join user_info ui on er.uid = ui.uid where score > 80 and tag = 'SQL' group by level order by level_cnt desc,level desc #什么时候连表,什么时候子查询,真是搞不清楚。好像连表的时候带group by的时候更多,子查询带w...
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-09 16:39
3D设计师
题解 | #试卷发布当天作答人数和平均分#
select exam_id, count(distinct uid) as uv, round(avg(score),1) as avg_score from exam_record where (exam_id,date(start_time)) in ( select exam_id,date(release_time) from examination_info where tag = 'SQL' ) and uid in( select uid from user_info where level >...
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-08 23:13
3D设计师
题解 | #月总刷题数和日均刷题数#
select coalesce(year_mon,'2021汇总') as submit_month, count(question_id) as month_q_cnt, round(count(question_id)/max(t.days_month),3) as avg_day_cnt from (select question_id, dayofmonth(last_day(submit_time)) as days_month, date_format(submit_time,'%Y%m') as year_mon from practice_record where year(s...
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-08 17:22
3D设计师
题解 | #平均活跃天数和月活人数#
select date_format(submit_time, '%Y%m') as month, round((count(distinct uid, date_format(submit_time, '%y%m%d'))) / count(distinct uid), 2) as avg_active_days, count(distinct uid) as mau from exam_record where submit_time is not null and year(submit_time) = 2021 group by date_format(su...
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-08 16:40
3D设计师
题解 | #得分不小于平均分的最低分#
select min(score) as min_score_over_avg from exam_record join examination_info using(exam_id) where tag= 'SQL' and score >= ( select avg(score) from exam_record join examination_info using(exam_id) where tag = 'SQL' ) #双and写法很意外 将min和avg分别书写
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-07 17:50
3D设计师
题解 | #创建一张新表#
create table if not exists user_info_vip( id int primary key auto_increment comment '自增ID', uid int unique not null comment '用户ID', nick_name varchar(64) comment '昵称', achievement int default 0 comment '成就值', `level` int comment '用户等级', job varchar(32) comment '职业方向', reg...
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-05 23:11
3D设计师
比亚迪不小心投递了
我简历填了一半,刷新页面后直接投递了。我写好完整的简历,无法再重新投递了,这怎么办,比亚迪还会收到完整的简历吗?急,很急,求知道的同学说一下
投递比亚迪精密制造等公司7个岗位 >
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-05 20:46
3D设计师
题解 | #返回购买 有顾客的电子邮件(二)#
select cust_email from Customers inner join Orders on Customers.cust_id = Orders.cust_id inner join OrderItems on OrderItems.order_num = Orders.order_num where prod_id = 'BR01' 出现了莫名其妙的bug,代码一字未动,一次不通过,一次可通过
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-05 20:42
3D设计师
组合 Products 表中的产品名称
select prod_name from Products union select cust_name from Customers order by prod_name asc 用union组合
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-05 20:25
3D设计师
题解 | #确定最佳顾客的另一种方式(二)#
select cust_name, sum(item_price*quantity) as total_price from Customers as c inner join Orders on c.cust_id = Orders.cust_id inner join OrderItems on Orders.order_num = OrderItems.order_num group by cust_name having total_price >= 1000 有些时候不写inner join,有点忘记
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-05 20:05
3D设计师
题解 | #返回顾客名称和相关订单号以及每个订单的总价#
select c.cust_name,o.order_num, sum(oi.quantity*oi.item_price) as OrderTotal from Customers as c inner join Orders as o on c.cust_id = o.cust_id inner join OrderItems as oi on o.order_num = oi.order_num group by c.cust_name,oi.order_num order by c.cust_name,oi.order_num asc 昨天刷了40多道题,今天再刷好想吐,脑子嗡嗡的
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-04 15:23
3D设计师
题解 | #对顾客ID和日期排序#
select cust_id,order_num from Orders order by cust_id asc,order_date desc easy
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-04 15:22
3D设计师
题解 | #检索顾客名称并且排序#
select cust_name from Customers order by cust_name desc 升降序
0
点赞
评论
收藏
转发
牛客843678496号
2023-03-04 15:19
3D设计师
题解 | #检索并列出已订购产品的清单#
select distinct prod_id from OrderItems easy
0
点赞
评论
收藏
转发
1
2
3
4
工具箱
TA的圈子
暂未加入圈子
TA的圈子
TA的笔记
暂无笔记
TA的笔记
登录
0
天
已登录
0
天
连续登录
0
人
今日访客
牛客网
牛客企业服务