首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
sqlsquare
获赞
58
粉丝
1
关注
16
看过 TA
61
男
西北农林科技大学
2017
大数据开发工程师
IP属地:北京
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑sqlsquare吗?
发布(21)
评论
刷题
收藏
sqlsquare
关注TA,不错过内容更新
关注
2022-03-09 18:51
西北农林科技大学 大数据开发工程师
sql余额越来越少了,每天少刷点珍惜了。
2022-03-09
在牛客打卡6天,今天学习:刷题 2 道/代码提交 3 次
每日监督打卡
0
点赞
评论
收藏
分享
2022-03-02 19:00
西北农林科技大学 大数据开发工程师
题解 | #检索每个顾客的名称和所有的订单号(二)#
select cust_name,order_num from Customers left join Orders using(cust_id) order by cust_name
0
点赞
评论
收藏
分享
2022-03-02 18:59
西北农林科技大学 大数据开发工程师
题解 | #检索每个顾客的名称和所有的订单号(一)#
select cust_name,order_num from Customers inner join Orders using(cust_id) order by cust_name
0
点赞
评论
收藏
分享
2022-03-02 18:32
西北农林科技大学 大数据开发工程师
题解 | #确定哪些订单购买了 prod_id 为 BR01 的产品(二)#
with t1 as ( select order_num from OrderItems where prod_id="BR01" ) select cust_id,order_date from t1 inner join Orders on t1.order_num=Orders.order_num order by order_date
0
点赞
评论
收藏
分享
2022-03-02 18:27
西北农林科技大学 大数据开发工程师
题解 | #返回顾客名称和相关订单号以及每个订单的总价#
select cust_name,t3.order_num ,sum(quantity*item_price) as OrderTotal from Customers t1 inner join Orders t2 on t1.cust_id=t2.cust_id inner join OrderItems t3 on t2.order_num=t3.order_num group by cust_n...
0
点赞
评论
收藏
分享
2022-03-02 17:17
西北农林科技大学 大数据开发工程师
题解 | #从 Products 表中检索所有的产品名称以及对应的销售总数#
select prod_name,sum(quantity) as quant_sold from Products join OrderItems on Products.prod_id=OrderItems.prod_id group by prod_name
牛客854813544号:
我想知道为什么 group by Products.prod_id 会报错
0
点赞
评论
收藏
分享
2022-03-02 16:57
西北农林科技大学 大数据开发工程师
题解 | #返回每个顾客不同订单的总金额#
select cust_id,sum(sum_ordered)as total_ordered from( select order_num,item_price,sum(quantity)*item_price as sum_ordered from OrderItems group by order_num,item_price )t1 join Orders on t1.order_num=Orders.order_num group by cust_id order by total_ordered desc;
0
点赞
评论
收藏
分享
2022-03-02 16:38
西北农林科技大学 大数据开发工程师
题解 | #确定哪些订单购买了 prod_id 为 BR01 的产品(一)#
select cust_id,order_date from Orders join OrderItems on Orders.order_num=OrderItems.order_num where prod_id='BR01' order by order_date
0
点赞
评论
收藏
分享
2022-03-02 16:17
西北农林科技大学 大数据开发工程师
题解 | #纠错3#
SELECT order_num, COUNT(*) AS items FROM OrderItems GROUP BY order_num HAVING COUNT(*) >= 3 ORDER BY items, order_num
0
点赞
评论
收藏
分享
2022-03-02 15:09
西北农林科技大学 大数据开发工程师
题解 | #返回订单数量总和不小于100的所有订单的订单号#
select order_num from( select order_num,sum(quantity) sum_q from OrderItems group by order_num )t1 where sum_q>100 order by order_num
0
点赞
评论
收藏
分享
2022-03-02 11:13
西北农林科技大学 大数据开发工程师
题解 | #顾客登录名#
select cust_id, cust_name, #upper(concat(left(cust_name,2),left(cust_city,3))) as user_login upper(concat(substring(cust_name,1,2),substring(cust_city,1,3))) as user_login from Customers 拼接concat 字符串相关函数 upper转大写,lower小写 substring 子字符串 left/right返回从左、右开始对应个数字符串
0
点赞
评论
收藏
分享
2022-03-02 10:51
西北农林科技大学 大数据开发工程师
题解 | #检索产品名称和描述(三)#
select prod_name,prod_desc from Products where prod_desc like "%toy%" and prod_desc like "%carrots%"
0
点赞
评论
收藏
分享
2022-01-26 19:31
西北农林科技大学 大数据开发工程师
名字终于变黄色了
2022-01-26
在牛客打卡5天,今天学习:刷题 4 道/代码提交 4 次
每日监督打卡
0
点赞
评论
收藏
分享
2022-01-22 19:37
西北农林科技大学 大数据开发工程师
求大数据大佬
2022-01-22
在牛客打卡4天,今天学习:刷题 6 道/代码提交 6 次
每日监督打卡
0
点赞
评论
收藏
分享
2022-01-22 19:22
西北农林科技大学 大数据开发工程师
题解 | #牛客直播转换率#
select c.course_id,course_name,round(sum(if_sign)*100/count(if_vw),2) from course_tb c join behavior_tb b where c.course_id=b.course_id group by c.course_id,course_name
0
点赞
评论
收藏
分享
1
2
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客企业服务