LeetCode(数据库)- 按月统计订单数与顾客数

简介: LeetCode(数据库)- 按月统计订单数与顾客数

题目链接:点击打开链接

题目大意:略。

解题思路:略。

AC 代码


SELECT DATE_FORMAT(order_date, '%Y-%m') month, COUNT(*) order_count, COUNT(DISTINCT customer_id) customer_count
FROM Orders
WHERE invoice > 20
GROUP BY month
目录
相关文章
|
3月前
|
算法 测试技术 C#
区间合并|LeetCode2963:统计好分割方案的数目
区间合并|LeetCode2963:统计好分割方案的数目
|
3月前
|
算法 安全 测试技术
[组合数学]LeetCode:2954:统计感冒序列的数目
[组合数学]LeetCode:2954:统计感冒序列的数目
|
3月前
|
算法 测试技术 C#
【离散差分】LeetCode2953:统计完全子字符串
【离散差分】LeetCode2953:统计完全子字符串
|
3月前
leetcode-1220:统计元音字母序列的数目
leetcode-1220:统计元音字母序列的数目
30 0
|
3月前
leetcode-1995. 统计特殊四元组
leetcode-1995. 统计特殊四元组
24 0
|
6天前
[leetcode~数位动态规划] 2719. 统计整数数目 hard
[leetcode~数位动态规划] 2719. 统计整数数目 hard
|
1月前
leetcode2376. 统计特殊整数
leetcode2376. 统计特殊整数
15 1
|
1月前
|
Serverless
leetcode2719. 统计整数数目
leetcode2719. 统计整数数目
14 0
|
3月前
|
算法 测试技术 C#
LeetCode2444: 统计定界子数组的数目
LeetCode2444: 统计定界子数组的数目
|
3月前
|
关系型数据库 MySQL 数据库
『 MySQL数据库 』聚合统计
『 MySQL数据库 』聚合统计

热门文章

最新文章