首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
垫底菜鸡
获赞
75
粉丝
8
关注
0
看过 TA
419
武汉大学
2022
算法工程师
IP属地:浙江
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑垫底菜鸡吗?
发布(59)
评论
刷题
收藏
垫底菜鸡
关注TA,不错过内容更新
关注
2023-03-05 20:42
武汉大学 算法工程师
组合 Products 表中的产品名称
select prod_name from Products union select cust_name from Customers order by prod_name asc 用union组合
0
点赞
评论
收藏
分享
2023-03-05 20:25
武汉大学 算法工程师
题解 | #确定最佳顾客的另一种方式(二)#
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
点赞
评论
收藏
分享
2023-03-05 20:05
武汉大学 算法工程师
题解 | #返回顾客名称和相关订单号以及每个订单的总价#
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
点赞
评论
收藏
分享
2023-03-04 15:23
武汉大学 算法工程师
题解 | #对顾客ID和日期排序#
select cust_id,order_num from Orders order by cust_id asc,order_date desc easy
0
点赞
评论
收藏
分享
2023-03-04 15:22
武汉大学 算法工程师
题解 | #检索顾客名称并且排序#
select cust_name from Customers order by cust_name desc 升降序
0
点赞
评论
收藏
分享
2023-03-04 15:19
武汉大学 算法工程师
题解 | #检索并列出已订购产品的清单#
select distinct prod_id from OrderItems easy
0
点赞
评论
收藏
分享
2023-03-04 15:18
武汉大学 算法工程师
题解 | #从 Customers 表中检索所有的 ID#
select * from Customers easy
0
点赞
评论
收藏
分享
2023-03-04 12:36
武汉大学 算法工程师
题解 | #21年8月份练题总数#
select count(distinct device_id) as did_cnt, count(question_id) as question_cut from question_practice_detail where date like '2021-08%' group by添加在聚合函数后面,日期还可以用like‘’表示。只写了月份要08,怪不得答案不对哈哈哈哈哈
0
点赞
评论
收藏
分享
2023-03-04 12:24
武汉大学 算法工程师
题解 | #查找后降序排列#
select device_id,gpa,age from user_profile order by gpa desc, age desc 和上一道题思路一样
0
点赞
评论
收藏
分享
2023-03-04 12:20
武汉大学 算法工程师
题解 | #查找后多列排序#
select device_id,gpa,age from user_profile order by gpa asc,age asc # 1/3组用例通过 and改逗号,就出来了。不过不是很懂原理
0
点赞
评论
收藏
分享
2023-03-04 12:10
武汉大学 算法工程师
题解 | #查找后排序#
select device_id,age from user_profile order by age asc 在中等和困难里挣扎后,突然遇到一道入门,也太快乐了
0
点赞
评论
收藏
分享
2023-03-04 12:09
武汉大学 算法工程师
题解 | #浙大不同难度题目的正确率#
select qd.difficult_level, #正确率是答正确的题/总题数 sum(if(result='right',1,0))/count(qpd.question_id) as correct_rate from user_profile as up inner join question_practice_detail as qpd on up.device_id = qpd.device_id and up.university = '浙江大学' inner join question_detail as qd on qpd.question_id = qd.question...
0
点赞
评论
收藏
分享
2023-03-04 11:40
武汉大学 算法工程师
题解 | #统计复旦用户8月练题情况#
select up.device_id,up.university, count(qpd.question_id) as question_cnt, sum(if(qpd.result='right',1,0)) as right_question_cut from user_profile as up left join question_practice_detail as qpd on up.device_id = qpd.device_id and month(qpd.date)=8 where up.university ='复旦大学' group by up.device_id 新...
0
点赞
评论
收藏
分享
2023-03-03 20:12
武汉大学 算法工程师
题解 | #找出每个学校GPA最低的同学#
select device_id,university,gpa from user_profile where (university,gpa) in (select university,min(gpa) from user_profile group by university) order by university #说是对不上,所以需要子查询 #这里是用子查询来做的 子查询很重要
0
点赞
评论
收藏
分享
2023-03-03 19:58
武汉大学 算法工程师
题解 | #截取出年龄#
select substring_index(substring_index(profile,',',3),',',-1) as age, count(device_id) as number from user_submit group by age 老是漏写,
0
点赞
评论
收藏
分享
1
2
3
4
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务