OkMaid
OkMaid
全部文章
题解
归档
标签
去牛客网
登录
/
注册
OkMaid的博客
全部文章
/ 题解
(共33篇)
题解 | #返回购买价格为 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
题解 | #统计每种性别的人数#
第一种比较笨笨 ```select 'female' as gender, count(*) as number from user_submit where profile like '%female' union all select 'm...
Mysql
2022-05-24
0
291
题解 | #计算用户8月每天的练题数量#
```select day(date) as day, count(question_id) as question_cnt from question_practice_detail where month(date) = 08 and year(date) = 2021 group by dat...
Mysql
2022-05-24
0
250
题解 | #计算25岁以上和以下的用户数量#
```select '25岁以下' as age_cut, count(device_id) as number from user_profile where age < 25 or age is null union select '25岁及以上' as age_cut, count(de...
Mysql
2022-05-24
0
296
首页
上一页
1
2
3
4
下一页
末页