![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
愚於禹
这个作者很懒,什么都没留下…
展开
-
LeetCode SQL刷题笔记DAY2
1. 题1873 if(employee_id % 2 = 1,(if(name like 'M%',0,salary)),0) AS bonus name like 'M%' 可用 left(name,1) 2. 题627 update salary set sex = if(sex = 'm','f','m') 3. 题196 delete from Person where Id not in ( select * from( select min(Id)原创 2022-05-01 19:38:22 · 210 阅读 · 0 评论 -
LeetCode SQL刷题笔记DAY3
1. 题1448 GROUP_CONCAT(DISTINCT PRODUCT) AS products 多列压缩 select sell_date,count(distinct product) AS num_sold,GROUP_CONCAT(DISTINCT PRODUCT) AS products from Activities group by sell_date 输入: Activities 表: +------------+-------------+ | sell_date | prod原创 2022-05-01 19:32:33 · 320 阅读 · 0 评论