排名

用户解题统计

过去一年提交了

勋章 ①金银铜:在竞赛中获得第一二三名;②好习惯:自然月10天提交;③里程碑:解决1/2/5/10/20/50/100/200题;④每周打卡挑战:完成每周5题,每年1月1日清零。

收藏

收藏日期 题目名称 解决状态
没有收藏的题目。

评论笔记

评论日期 题目名称 评论内容 站长评论
没有评论过的题目。

提交记录

提交日期 题目名称 提交代码
2025-08-23 分类(1)姿势太多很过分,分类要用CaseWhen 
select *
from cmb_usr_trx_rcd limit 5
2025-08-23 分类(1)姿势太多很过分,分类要用CaseWhen 
select
case when trx_amt=288 then '1.WithHand'
when trx_amt=388 then '2.WithMimi'
when trx_amt=588 then '3.BlowJobbie'
when trx_amt=888 then '4.Doi'
when trx_amt=1288 then '5.DoubleFly'
else '6.other'
end as ser_typ
,count(1) as trx_cnt
,min(date(trx_time)) as first_date
from 
cmb_usr_trx_rcd
where usr_id='5201314520' and mch_nm='红玫瑰按摩保健休闲'
group by ser_typ
order by 1
2025-08-23 特定渠道的中档单价用户 
select * from 
apple_pchs_rcd 
where order_channel = '官网' and
payment_method = 'Apple Pay' and
product_price >= 3000
order by order_id asc
2025-08-23 文科潜力股 
select * 
from scores 
where exam_date = '2024-06-30' and
subject in ('考试','历史','政治','地理') and 
score >=90
order by score desc
2025-08-23 给英语成绩中上水平的学生拔尖 
select *
from scores 
 where subject = '英语' 
 and score>=100 and score<=110
 and exam_date = '2024-06-30'
 order by score asc
2025-08-23 给英语成绩中上水平的学生拔尖 
select *
from scores 
 where subject = '英语' 
 and score>=100 and score<=110
 order by score asc
2025-08-23 给英语成绩中上水平的学生拔尖 
select *
from scores 
 where subject = '英语' 
 and score>=110 and score<=110
 order by score asc
2025-08-23 找出三个班级的女生 
select * 
from students 
where gender = 'F'
 and class_code in ('C219','C220','C221')
2025-08-23 大于J小于K的手牌 
select * 
from hand_permutations 
where (card1 > 'J%' and card1 <'K%') and 
(card2 > 'J%' and card2 <'K%')
2025-08-23 2000年以前出生的男歌手 
select * 
from singer_info 
where year (birth_date) < 2000 and gender = 'M'
2025-08-23 总分超过300分的学生 
select student_id
from 
subject_score
where chinese+math+english > 300
2025-08-23 总分超过300分的学生 
select student_id ,sum(chinese+math+english)
from subject_score 
group by student_id
2025-08-23 国庆假期后第一天涨幅高于1%的股票 
select ts_code,open_price,close_price
from daily_stock_prices 
where trade_date = '2023-10-09' and 
pct_change>=1
2025-08-23 国庆假期后第一天涨幅高于1%的股票 
select * 
from daily_stock_prices 
where trade_date = '2023-10-09' and 
pct_change>=1
2025-08-23 国庆假期后第一天涨幅高于1%的股票 
select * 
from daily_stock_prices 
where trade_date = '2023-10-09' and 
pct_change>1
2025-08-23 国庆假期后第一天涨幅高于1%的股票 
select * 
from daily_stock_prices 
where trade_date = '2023-10-09'
2025-08-23 德州扑克起手牌-最强起手牌KK+ 
select * 
from hand_permutations 
where (card1 like 'A%' and card2 like 'A%') or
(card1 like 'K%' and card2 like 'K%') or
(card1 like 'A%' and card2 like 'K%') or
(card1 like 'K%' and card2 like 'A%')
2025-08-23 S1年级物理成绩前10名(1) 
WITH ranked_scores AS (
    SELECT 
        s.student_id, 
        s.name, 
        sc.score,
        ROW_NUMBER() OVER (PARTITION BY s.grade_code ORDER BY sc.score DESC) AS rnk
    FROM 
        students s
    JOIN 
        scores sc ON s.student_id = sc.student_id
    WHERE 
        s.grade_code = 'S1' 
        AND sc.subject = '物理'
)
SELECT 
    student_id, 
    name, 
    score, 
    rnk
FROM 
    ranked_scores
WHERE 
    rnk <= 10
ORDER BY 
    rnk,student_id
2025-08-23 S1年级物理成绩前10名(1) 
WITH ranked_scores AS (
    SELECT 
        s.student_id, 
        s.name, 
        sc.score,
        ROW_NUMBER() OVER (PARTITION BY s.grade_code ORDER BY sc.score DESC) AS rnk
    FROM 
        students s
    JOIN 
        scores sc ON s.student_id = sc.student_id
    WHERE 
        s.grade_code = 'S1' 
        AND sc.subject = '物理'
)
SELECT 
    student_id, 
    name, 
    score, 
    rnk
FROM 
    ranked_scores
 ORDER BY 
    rnk,student_id
2025-08-23 S1年级物理成绩前10名(1) 
WITH ranked_scores AS (
    SELECT 
        s.student_id, 
        s.name, 
        sc.score,
        ROW_NUMBER() OVER (PARTITION BY s.grade_code ORDER BY sc.score DESC) AS rnk
    FROM 
        students s
    JOIN 
        scores sc ON s.student_id = sc.student_id
    WHERE 
        s.grade_code = 'S1' 
        AND sc.subject = '物理'
)
SELECT 
    student_id, 
    name, 
    score, 
    rnk
FROM 
    ranked_scores