我有明珠一颗
我有明珠一颗
全部文章
分类
归档
标签
去牛客网
登录
/
注册
我有明珠一颗的博客
全部文章
(共11篇)
题解 | 每个顾客购买的最新产品名称
select customer_id, customer_name, product_name as latest_order from orders join customers using(customer_id) join products using(product_id) where (c...
2025-07-18
1
63
题解 | 统计每个产品的销售情况
with prod_mon_sales as ( select product_id, unit_price, month(order_date) as mon, sum(quantity*unit_price) as mon_total_sales, sum(quantity) as mon_to...
2025-07-18
1
71
题解 | 完成员工考核试卷突出的非领导员工
with avg_s as ( select tag, avg(timestampdiff(second, start_time, submit_time)) as avg_time, avg(score) as avg_acore from exam_record join examinatio...
2025-07-17
0
71
题解 | 短视频直播间晚上11-12点之间各直播间的在线人数
select room_id, room_name, count(distinct user_id) as user_count from user_view_tb join room_info_tb using(room_id) where in_time <= '24:00:00' and...
2025-07-17
0
63
题解 | 被重复观看次数最多的3个视频
select cid, round(cast(count(*) as float), 3) as pv, row_number() over(order by count(*) desc, release_date desc) as rk from play_record_tb join cours...
2025-07-17
1
72
题解 | 请写出计算粉丝ctr的sql语句
select sum(read_num)/sum(show_num) as fans_ctr from a join b using(author_id) join c using(content_id, fans_id) 用 using 会很简洁
2025-07-17
8
75
题解 | 返回购买 prod_id 为 BR01 的产品的所有顾客的电子邮件(一)
select cust_email from Customers where cust_id in ( select cust_id from Orders where order_num in ( select order_num from OrderItems where prod_id = &...
2025-07-16
0
66
题解 | 获得积分最多的人(三)
select id, name, grade_num from ( select user_id, sum(if(type = 'reduce', grade_num * (-1), grade_num)) as grade_num, dense_rank() over(order b...
2025-07-16
1
58
题解 | #删除字符串中出现次数最少的字符#
import java.util.Scanner; import java.util.HashMap; import java.util.Collections; import java.util.Map.Entry; public class Main { public static v...
2023-11-10
0
264
题解 | #求最小公倍数#
l = list(map(int, input().strip().split())) a, b = max(l), min(l) while b > 0: temp = a % b a = b b = temp print(l[0] * l[1] // a)
2023-10-23
0
129
首页
上一页
1
2
下一页
末页