排名

用户解题统计

过去一年提交了

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

收藏

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

评论笔记

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

提交记录

提交日期 题目名称 提交代码
2025-12-23 多云天气天数 
select city,
    sum(case when con like '%多云%' then 1 else 0 end) as cloudy_days
    ,concat(cast(sum(case when con like '%多云%' then 1 else 0 end)/count(1)*100 as decimal(10,2)),'%')  as p
from 
    weather_rcd_china
where 
    year(dt)=2021
group by 
    city
order by 
    3 desc
2025-12-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-12-22 分组与聚合函数(6)想知道渣男有多坏,疯狂使用GroupBy 
select
	usr_id,
mch_nm,
sum(trx_amt) as trx_amt,
count(trx_amt) as trx_cnt,
min(trx_time) as first_time
from
	cmb_usr_trx_rcd
where 
	usr_id = '5201314520'
and trx_amt >= 288
group by
	usr_id,
	mch_nm
order by
	trx_cnt desc
2025-12-22 分组与聚合函数(1)Money全都花在哪,GroupBy来查一查 
select 
	mch_nm,
sum(trx_amt) as sum_trx_amt
from 
	cmb_usr_trx_rcd
where 
	usr_id = '5201314520'
and left(trx_time, 4) = '2024'
group by mch_nm
2025-12-21 特定渠道的中档单价用户 
select 
	* 
from 
	apple_pchs_rcd
where
	product_price >= 3000 and payment_method = 'Apple Pay' and order_channel = '官网'
order by order_id;
2025-12-21 特定渠道的中档单价用户 
select * 
from apple_pchs_rcd
where
	product_price >= 3000
order by order_id;
2025-12-21 文科潜力股 
select *
from scores
where exam_date = '2024-06-30'
and score >= 90
and subject in ('历史', '政治', '地理') 
order by score desc ,student_id,subject;
2025-12-21 给英语成绩中上水平的学生拔尖 
select * from scores
where
	exam_date = '2024-06-30'
and subject = '英语' 
and score between 100 and 110
order by score desc;
2025-12-21 给英语成绩中上水平的学生拔尖 
select * from scores
where
	exam_date = '2024-06-30'
and (subject = '英语' and score in (100, 110))
order by score;
2025-12-21 找出三个班级的女生 
select * from students
 where class_code in ('C219', 'C220', 'C221') 
 	and gender = 'f'
 order by student_id;
2025-12-21 找出三个班级的女生 
select * from students
 where class_code in ('C219', 'C220', 'C221')
 order by student_id;
2025-12-21 大于J小于K的手牌 
select 
    * 
from 
    hand_permutations
where 
    card1 > 'J'  and card1 < 'K'
    and 
     card2 > 'J'  and card2 < 'K'
2025-12-21 大于J小于K的手牌 
select * from hand_permutations
where 
	left(card1, 1) >= 'J' 
and left(card1, 1) <= 'K'
and left(card2, 1) >= 'J'
and left(card2, 1) <= 'K'
order by id
;
2025-12-21 2000年以前出生的男歌手 
select * from singer_info 
where left(birth_date, 4) < '2000'
	and gender = 'm'
2025-12-21 2000年以前出生的男歌手 
select * from singer_info 
where left(birth_date, 4) < '2000'
2025-12-21 总分超过300分的学生 
select student_id from subject_score 
where
	chinese + math + english >= 300
2025-12-21 国庆假期后第一天涨幅高于1%的股票 
select ts_code,
	open_price,
close_price
from daily_stock_prices 
where 
	pct_change > 1 and trade_date = '2023-10-09'
2025-12-21 德州扑克起手牌-最强起手牌KK+ 
select * from hand_permutations 
where (substr(card1, 1,1)= 'A' and substr(card2, 1,1) = 'A')
or (substr(card1, 1,1)= 'K' andsubstr(card2, 1,1) = 'K')
or (left(card1, 1) = 'A' and left(card2, 1) = 'K')
or (left(card1, 1) = 'K' and left(card2, 1) = 'A')
order by id;