07 2023 档案
摘要:# 分组查询时,select的字段是否一定要都在group by中? 分组查询关键字group by通常和集合函数(MAX、MIN、COUNT、SUM、AVG)一起使用,它可以对一列或者多列结果集进行分组。例如要统计超市水果的种类,需要用count函数,要统计哪个水果价格最高,要用MAX()函数。
阅读全文
摘要:# MySQL NULL 值判断 ## IFNULL 函数 IFNULL(expr1,expr2)用法:假如expr1不为NULL,则 IFNULL() 的返回值为expr1; 否则其返回值为 expr2。IFNULL()的返回值是数字或是字符串,具体情况取决于其所使用的语境。 - ~~~sql m
阅读全文
摘要:# SQL Date 函数 ## 一、SQL 日期 当我们处理日期时,最难的任务恐怕是确保所插入的日期的格式,与数据库中日期列的格式相匹配。 只要数据包含的只是日期部分,运行查询就不会出问题。但是,如果涉及时间,情况就有点复杂了。 在讨论日期查询的复杂性之前,我们先来看看最重要的内建日期处理函数。
阅读全文
摘要:# 可回收且低脂的产品 > 原文地址:[1757. 可回收且低脂的产品 - 力扣(LeetCode)](https://leetcode.cn/problems/recyclable-and-low-fat-products/) - 题目如下所示 ](https://leetcode.cn/problems/find-total-time-spent-by-each-employee/) - 题目如下所示. ](https://leetcode.cn/problems/find-followers-count/) - 题目如下所示 ](https://leetcode.cn/problems/daily-leads-and-partners/) - 题目如下所示 ](https://leetcode.cn/problems/fix-names-in-a-table/) - 题目如下所示 ](https://leetcode.cn/problems/bank-account-summary-ii/) - 题目如下所示 ](https://leetcode.cn/problems/customer-who-visited-but-did-not-make-any-transactions/) - 题目如下
阅读全文
摘要:# 患某种疾病的患者 > 原文地址:[1527. 患某种疾病的患者 - 力扣(LeetCode)](https://leetcode.cn/problems/patients-with-a-condition/) - 题目如下所示 ](https://leetcode.cn/problems/group-sold-products-by-the-date/) - 题目如下所示 ](https://leetcode.cn/problems/top-travellers/) - 题目如下所示 ](https://leetcode.cn/problems/article-views-i/) - 题目如下所示 ](https://leetcode.cn/problems/user-activity-for-the-past-30-days-i/) - 题目如下所示 ](https://leetcode.cn/problems/sales-analysis-iii/) - 题目如下所示 ](https://leetcode.cn/problems/actors-and-directors-who-cooperated-at-least-three-times/) -
阅读全文
摘要:# 变更性别 > 原文地址:[627. 变更性别 - 力扣(LeetCode)](https://leetcode.cn/problems/swap-salary/) - 题目如下所示 ](https://leetcode.cn/problems/sales-person/) - 题目如下所示 ](https://leetcode.cn/problems/big-countries/) - 题目如下所示 ](https://leetcode.cn/problems/customer-placing-the-largest-number-of-orders/) - 题目如下所示 ](https://leetcode.cn/problems/find-customer-referee/) - 题目如下所示 ](https://leetcode.cn/problems/game-play-analysis-i/) - 题目如下所示 ](https://leetcode.cn/problems/rising-temperature/) - 题目如下所示 ](https://leetcode.cn/problems/delete-duplicate-emails/) - 题目如下所示 ](https://leetcode.cn/problems/customers-who-never-order/) - 题目如下所示 ](https://leetcode.cn/problems/duplicate-emails/) - 题目如下所示 ](https://leetcode.cn/problems/employees-earning-more-than-their-managers/) - 题目如下所示 ](https://leetcode.cn/problems/combine-two-tables/) - 题目如下所示 ![](https://img2023.cnblogs.com/blog/2904930/202
阅读全文