OkMaid
OkMaid
全部文章
分类
题解(34)
归档
标签
去牛客网
登录
/
注册
OkMaid的博客
全部文章
(共70篇)
题解 | #确定最佳顾客的另一种方式(二)#
```select c.cust_name, ois.total_price from Customers c join Orders o on c.cust_id = o.cust_id join (select order_num, sum(item_price * quantity) as t...
Mysql
2022-05-29
0
294
题解 | #返回顾客名称和相关订单号以及每个订单的总价#
select cust_name, t1.order_num, oi.OrderTotal from Customers join Orders t1 using(cust_id) join (select&n...
Mysql
2022-05-28
0
275
题解 | #返回每个顾客不同订单的总金额#
select o.cust_id, oi.total_ordered from Orders o join (select os.order_num, sum(item_price * q...
Mysql
2022-05-28
0
233
题解 | #返回购买价格为 10 美元或以上产品的顾客列表#
select cust_id from Orders where order_num in (select distinct order_num ...
Mysql
2022-05-28
0
252
题解 | #检索并列出已订购产品的清单#
select order_num, prod_id, quantity from OrderItems group by order_num, prod_id, quantity having quantity...
Mysql
2022-05-25
1
656
题解 | #返回更多的产品#
select u.order_num from(select order_num, sum(quantity) as num from OrderItems group by order_num having ...
Mysql
2022-05-25
0
290
题解 | #计算用户的平均次日留存率#
COUNT(q2.device_id) / COUNT(q1.device_id) AS avg_ret FROM (SELECT DISTINCT device_id, date FROM question_practice_detail)as q1 LEFT JOIN (SE...
Mysql
2022-05-25
0
331
题解 | #找出每个学校GPA最低的同学#
select device_id,university,gpa from user_profile where (university,gpa) in (select university,min(gpa) from u...
Mysql
2022-05-24
0
300
题解 | #提取博客URL中的用户名#
select device_id, substring_index(blog_url, '/', -1) as user_name from user_submit 和上一题一样用到 su...
Mysql
2022-05-24
0
281
题解 | #截取出年龄#
```select substring_index(substring_index(profile, ',', -2), ',', 1) as age, count(device_id) as number from user_submit group by age substr...
Mysql
2022-05-24
0
329
首页
上一页
1
2
3
4
5
6
7
下一页
末页