排名

用户解题统计

过去一年提交了

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

收藏

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

评论笔记

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

提交记录

提交日期 题目名称 提交代码
2025-03-14 经过第四象限的所有函数 
SELECT *
FROM numbers_for_fun
WHERE
    (a = 0 AND (
        (b = 0 AND c < 0) 
        OR (b != 0 AND (
            (b > 0 AND c < 0) 
            OR (b < 0)        
        ))
    ))
    OR
    (a != 0 AND (
        (a > 0 AND (c < 0 OR (b < 0 AND 4*a*c < b*b)))
        OR
        (a < 0)
    ));
2025-03-14 经过第四象限的所有函数 
select * from numbers_for_fun
where (a=0 and (b>0 and c<0) or (b=0 and c>0) or (b<0)) or (a != 0 AND ((a > 0 AND (c < 0 OR (b < 0 AND 4*a*c < b*b)))
        OR
        (a < 0)
    ))
2025-03-14 经过第四象限的所有函数 
select * from numbers_for_fun
where (a=0 and (b>=0 and c>0) or (b<=0 and c>0)) or (a>0 and ((b<=0 and c<=0) or (c>=(b*b)/(4*a)))) or (a<0)
2025-03-14 经过第四象限的所有函数 
select * from numbers_for_fun
where (a=0 and (b>=0 and c>0) or (b<=0 and c>0)) or (a>0 and ((b<=0 and c<=0) or (c>=(b*b)/(4*a))))
2025-03-14 经过第四象限的所有函数 
select * from numbers_for_fun
where (a=0 and b>=0 and c>=0) or (a>0 and ((b<=0 and c<=0) or (c>=(b*b)/(4*a))))
2025-03-14 经过第四象限的所有函数 
select * from numbers_for_fun
where (a=0 and b>=0 and c>=0) or (a>0 and ((b>=0 and c>=0) or (c>=(b*b)/(4*a))))
2025-03-14 登录天数分布 
with past as (
select usr_id,login_time from user_login_log
where datediff(current_date,login_time)<=180
order by usr_id
),
date as (
select usr_id,date(login_time) login_date from past
),
day as (
select usr_id,count(distinct login_date) login_days from date
group by usr_id
)
select
SUM(CASE WHEN login_days BETWEEN 1 AND 5 THEN 1 ELSE 0 END) AS days_1_to_5,
SUM(CASE WHEN login_days BETWEEN 6 AND 10 THEN 1 ELSE 0 END) AS days_6_to_10,
SUM(CASE WHEN login_days BETWEEN 11 AND 20 THEN 1 ELSE 0 END) AS days_11_to_20,
SUM(CASE WHEN login_days > 20 THEN 1 ELSE 0 END) AS days_over_20
from day
2025-03-14 不经过第二象限的所有函数 
select * from numbers_for_fun
where (a=0 and b>=0 and c <=0) or (a<0 and ((b>=0 and c<=0) or (c<=(b*b)/(4*a))))
2025-02-25 基于共同兴趣爱好的餐厅推荐(1)-我吃过啥 
select distinct cust_uid,mch_nm from mt_trx_rcd1
where cust_uid='MT10000'
order by mch_nm
2025-02-25 特定渠道的中档单价用户 
select * from apple_pchs_rcd
where order_channel='官网' and payment_method='Apple Pay' and product_price>=3000
order by order_id
2025-02-25 文科潜力股 
select * from scores
where exam_date='2024-06-30' and ((subject='历史' and score>=90) or (subject='政治' and score>=90) or (subject='地理' and score>=90))
order by score desc,student_id,subject
2025-02-25 文科潜力股 
select * from scores
where exam_date='2024-06-30' and ((subject='历史' and score>=90) or (subject='政治' and score>=90) or (subject='政治' and score>=90))
order by score desc,student_id,subject
2025-02-25 文科潜力股 
select * from scores
where exam_date='2024-06-30' and ((subject='历史' or score>=90) or (subject='政治' or score>=90) or (subject='政治' or score>=90))
order by score desc,student_id,subject
2025-02-25 文科潜力股 
select * from scores
where exam_date='2024-06-30' and ((subject='历史' or score>=90) and (subject='政治' or score>=90) and (subject='政治' or score>=90))
order by score desc,student_id,subject
2025-02-25 给英语成绩中上水平的学生拔尖 
select * from scores
where exam_date='2024-06-30' and subject='英语' and score between 100 and 110
order by score desc
2025-02-25 给英语成绩中上水平的学生拔尖 
select * from scores
where exam_date='2024-06-30' and subject='英语' and score between 100 and 110
2025-02-25 找出三个班级的女生 
select * from students
where class_code in ('c219','c220','c221') and gender='f'
order by student_id
2025-02-25 找出三个班级的女生 
select * from students
where class_code in ('c219','c220','c221')
order by student_id
2025-02-25 德州扑克起手牌-同花 
select sum(case when right(card1,1)=right(card2,1) then 1 else 0 end)/2 cnt,count(*)/2 ttl_cnt,cast((sum(case when right(card1,1)=right(card2,1) then 1 else 0 end))/(count(*)) as decimal(4,3)) p from hand_permutations
2025-02-25 德州扑克起手牌-同花 
select sum(case when right(card1,1)=right(card2,1) then 1 else 0 end)/2 cnt,round(count(*)/2,0) ttl_cnt,cast((sum(case when right(card1,1)=right(card2,1) then 1 else 0 end))/(count(*)) as decimal(4,3)) p from hand_permutations