小宇啊
小宇啊
全部文章
分类
归档
标签
去牛客网
登录
/
注册
小宇啊的博客
全部文章
(共111篇)
题解 | #将两个 SELECT 语句结合起来(一)#
select * from (select prod_id, quantity from OrderItems where quantity = 100 union select ...
2024-09-19
0
92
题解 | #列出供应商及其可供产品的数量#
select a.vend_id, coalesce(count(prod_id),0) as prod_id from Vendors a left join Products b on a.vend_id = b.vend_id group by 1 o...
2024-09-19
0
102
题解 | #返回顾客名称和相关订单号以及每个订单的总价#
select a.cust_name, b.order_num, c.OrderTotal from Customers a left join Orders b on a.cust_id = b.cust_id left join ( ...
2024-09-19
0
97
题解 | #返回每个顾客不同订单的总金额#
select b.cust_id, sum(a.item_price * a.quantity) as total_ordered from OrderItems a left join Orders b on a.order_num = b.order_num...
2024-09-18
0
92
题解 | #纠错3#
SELECT order_num, COUNT(*) AS items FROM OrderItems GROUP BY 1 HAVING COUNT(*) >= 3 ORDER BY 1;
2024-09-18
0
93
题解 | #计算总和#
select order_num, sum(item_price * quantity) as total_price from OrderItems group by 1 having sum(item_price * quantity) >= 1000...
2024-09-18
0
88
题解 | #返回订单数量总和不小于100的所有订单的订单号#
select order_num from OrderItems group by 1 having sum(quantity) >= 100 order by 1
2024-09-18
0
120
题解 | #某乎问答11月份日人均回答量#
select answer_date, round(count(issue_id) / count(distinct author_id),2) as per_num from answer_tb where year(answer_date) = 2021 and...
2024-09-18
0
114
题解 | #牛客网的每日练题量#
import pandas as pd df = pd.read_csv('nowcoder.csv',sep=',') df['date'] = pd.to_datetime(df['date']) dec_data = df[ (df['date'].dt.year == 2021)...
2024-09-17
0
101
题解 | #两份用户信息表格中的查找#
import pandas as pd # 设置pandas显示配置,以显示完整的数据框 pd.set_option("display.width", 300) pd.set_option("display.max_rows", None) pd.set_o...
2024-09-17
0
106
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页