排名
用户解题统计
过去一年提交了
勋章 ①金银铜:在竞赛中获得第一二三名;②好习惯:自然月10天提交;③里程碑:解决1/2/5/10/20/50/100/200题;④每周打卡挑战:完成每周5题,每年1月1日清零。
收藏
收藏日期 | 题目名称 | 解决状态 |
---|---|---|
2025-01-15 | 条件过滤(1)异地男友有异常,数分闺蜜来帮忙 | 已解决 |
评论笔记
评论日期 | 题目名称 | 评论内容 | 站长评论 |
---|---|---|---|
没有评论过的题目。 |
提交记录
提交日期 | 题目名称 | 提交代码 |
---|---|---|
2025-01-16 | 输出地区为北京的所有银行  |
select * from stock_info where area = '北京' and industry = '银行' order by list_date |
2025-01-16 | 1989年12月13日出生的女歌手  |
select * from singer_info where birth_date = '1989-12-13' and gender = 'f' |
2025-01-16 | 找出所有港台歌手  |
select * from singer_info wheretype2 = '港台' order by singer_id |
2025-01-16 | 找出所有港台歌手  |
select * from singer_info where gender != 'u' and type2 = '港台' order by singer_id |
2025-01-16 | 找出所有港台乐队  |
select * from singer_info where type2 = '港台' and gender = 'u' order by singer_id |
2025-01-16 | 用户"kjhd30"的第一笔未完成订单  |
select * from didi_order_rcd where cust_uid = 'kjhd30' and year(finish_time) = 1970 order by order_id limit 1 |
2025-01-16 | 分组与聚合函数(2)擦边营收怎么样,聚合函数可看出  |
select date(trx_time)trx_date, max(trx_amt)max_trx_amt, min(trx_amt) min_trx_amt, avg(trx_amt)avg_trx_amt, sum(trx_amt)total_trx_amt from cmb_usr_trx_rcd where mch_nm = '红玫瑰按摩保健休闲' and date(trx_time) between '2024-09-01' and '2024-09-30' group by trx_date order by trx_date; |
2025-01-16 | 分组与聚合函数(1)Money全都花在哪,GroupBy来查一查  |
SELECT mch_nm, SUM(trx_amt) AS sum_trx_amt FROM cmb_usr_trx_rcd WHERE usr_id = 5201314520 AND year(trx_time) = 2024 GROUP BY mch_nm ORDER BY sum_trx_amt DESC; |
2025-01-16 | 分组与聚合函数(1)Money全都花在哪,GroupBy来查一查  |
SELECT mch_nm, SUM(trx_amt) AS sum_trx_amt FROM cmb_usr_trx_rcd WHERE usr_id = 5201314520 AND trx_time >= '2024-01-01 00:00:00' AND trx_time <= '2024-12-31 23:59:59' GROUP BY mch_nm ORDER BY sum_trx_amt DESC; |
2025-01-16 | 交易金额大于10000元的所有交易  |
select * from cmb_usr_trx_rcd where trx_amt >= 100000 order by trx_amt desc |
2025-01-16 | 交易金额大于10000元的所有交易  |
select * from cmb_usr_trx_rcd where trx_amt >= 100000 order by trx_amt |
2025-01-16 | 交易金额大于10000元的所有交易  |
select * from cmb_usr_trx_rcd where trx_amt > 100000 order by trx_amt |
2025-01-15 | 条件过滤(3)Hour函数很给力,组合条件要仔细  |
select * from cmb_usr_trx_rcd where usr_id = 5201314520 and trx_time >= '2024-09-01 00:00:00' and trx_time < '2024-09-30 23:59:59' and hour(trx_time) in (22,23,0,1,2,3,4,5) order by trx_time |
2025-01-15 | 条件过滤(3)Hour函数很给力,组合条件要仔细  |
select * from cmb_usr_trx_rcd where usr_id = 5201314520 and trx_time >= '2024-09-01 00:00:00' and trx_time < '2024-09-30 23:59:59' and ( (time(trx_time) >= '22:00:00' and time(trx_time) <= '23:59:59') or (time(trx_time) >= '00:00:00' and time(trx_time) <= '05:00:00') ) order by trx_time |
2025-01-15 | 条件过滤(2)半夜活动有猫腻,Hour函数给给力  |
select * from cmb_usr_trx_rcd where usr_id = 5201314520 and trx_time >= '2024-09-01 00:00:00' and trx_time <= '2024-09-30 23:59:59' and time(trx_time) >= '01:00:00' and time(trx_time) < '06:00:00' order by trx_time |
2025-01-15 | 条件过滤(1)异地男友有异常,数分闺蜜来帮忙  |
SELECT * FROM cmb_usr_trx_rcd WHERE usr_id = 5201314520 AND trx_time >= '2024-09-01 00:00:00' AND trx_time <= '2024-09-30 23:59:59' ORDER BY trx_time ASC; |
2025-01-14 | 条件过滤(1)异地男友有异常,数分闺蜜来帮忙  |
select * from cmb_usr_trx_rcd limit 5; |