上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 95 下一页
摘要: 简介 select user_id from ( select id, user_id, product_name, status, client_id, date, count(1) over (partition by user_id) as num from order_info where 阅读全文
posted @ 2021-07-01 15:08 HDU李少帅 阅读(55) 评论(0) 推荐(0)
摘要: 简介 select id, user_id, product_name, status, client_id, date from ( select id, user_id, product_name, status, client_id, date, count(1) over (partitio 阅读全文
posted @ 2021-07-01 15:07 HDU李少帅 阅读(59) 评论(0) 推荐(0)
摘要: 简介 from 接 子查询 count(1) 统计个数 over (partition by user_id) 以user_id 进行分区 left join on 后面还可以加上where select a.id, a.is_group_buy, b.name as client_name fro 阅读全文
posted @ 2021-07-01 14:53 HDU李少帅 阅读(49) 评论(0) 推荐(0)
摘要: 简介 考察DATE_FORMAT 与 group 联立 order by 联立 select job, DATE_FORMAT(date, '%Y-%m') as mon, sum(num) as cnt from resume_info where date like '2025%' group 阅读全文
posted @ 2021-07-01 12:00 HDU李少帅 阅读(55) 评论(0) 推荐(0)
摘要: 简介 考察 over 从一行到另一行?? 先暂时这么记忆吧 select grade, sum(number) over(order by grade) t_rank from class_grade order by grade; 阅读全文
posted @ 2021-07-01 11:51 HDU李少帅 阅读(34) 评论(0) 推荐(0)
摘要: 简介 select concat(last_name, ' ', first_name) as Name from employees; 阅读全文
posted @ 2021-07-01 11:40 HDU李少帅 阅读(107) 评论(0) 推荐(0)
摘要: 简介 INSERT INTO actor values (1, 'PENELOPE', 'GUINESS', '2006-02-15 12:34:33'), (2, 'NICK', 'WAHLBERG', '2006-02-15 12:34:33') 阅读全文
posted @ 2021-07-01 11:38 HDU李少帅 阅读(43) 评论(0) 推荐(0)
摘要: 简介 删除emp_no重复的记录,只保留最小的id对应的记录。 DELETE FROM titles_test where id not in( select * from( select MIN(id) from titles_test group by emp_no )as a ) 阅读全文
posted @ 2021-07-01 11:34 HDU李少帅 阅读(65) 评论(0) 推荐(0)
摘要: 简介 修改数据 update titles_test set emp_no = replace(emp_no, 10001, 10005) where id = 5; update titles_test set to_date = NULL, from_date ='2001-01-01' whe 阅读全文
posted @ 2021-07-01 11:30 HDU李少帅 阅读(51) 评论(0) 推荐(0)
摘要: 简介 alter table titles_test rename to titles_2017; 阅读全文
posted @ 2021-07-01 11:17 HDU李少帅 阅读(117) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 95 下一页