误清秋
误清秋
全部文章
分类
归档
标签
去牛客网
登录
/
注册
误清秋的博客
全部文章
(共21篇)
题解 | 目标月份的品类销售简报
select p.category, count(distinct o.order_id) as orders_cnt, count(distinct o.buyer_id) as buyers_cnt, sum(oi.qty) as items_qty, ...
2026-03-21
0
32
题解 | 统计创作者
select p.author_id, a.author_name, count(*) as posts_30d, sum(p.like_cnt) as likes_30d, (case when count(*) = 0 then 0 else round(sum(p.like_cnt)/coun...
2026-03-21
0
24
题解 | 给出employees表中排名为奇数行的first_name
select e.first_name as Georgi from employees e join ( select first_name, row_number() over(order by first_name a...
2026-03-21
0
37
题解 | 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
with lsb as (select max(s.salary) as ms from employees e join salaries s on e.emp_no = s.emp_no), lsb2 as (select max(salary) as ms1 from( select e.em...
2026-03-21
0
24
题解 | 统计骑手信息
select t1.zone_id, t1.zone_name, t1.peak_2023_02_delivered, t1.peak_2024_02_delivered, t1.peak_2024_01_delivered, t1.yoy_delta, t1.mom_delta, t1.avg_p...
2026-03-19
0
31
题解 | 统计借阅量
SELECT b.book_id, b.book_title, COUNT(CASE WHEN DATE_FORMAT(bo.borrow_date, '%Y-%m') = '2023-02' THEN bo.record_id END) AS feb_2023_borro...
2026-03-19
0
20
题解 | 统计每个产品的销售情况
WITH product_sales AS ( SELECT o.product_id, ROUND(SUM(o.quantity * p.unit_price), 2) AS total_sales, p.unit_price, ...
2026-03-19
0
20
题解 | 统计每个产品的销售情况
WITH product_sales AS ( SELECT o.product_id, ROUND(SUM(o.quantity * p.unit_price), 2) AS total_sales, p.unit_price, ...
2026-03-19
0
24
题解 | 完成员工考核试卷突出的非领导员工
with lsb as (select exam_id as examid, avg(minute_diff) as avg_time, avg(score) as avg_score from (select emp_id, exam_id, TIMESTAMPDIFF(MINUTE,start...
2026-03-19
0
31
题解 | 查询连续登陆的用户
select user_id from (select user_id, date_sub(date,interval rk day) from( select user_id, date_format(log_time,'%Y-%m-%d') as date, dense_rank() o...
2026-03-18
0
26
首页
上一页
1
2
3
下一页
末页