Skip to content

Commit e6eee78

Browse files
committed
Upload 147
1 parent 7c16332 commit e6eee78

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ The problems and both submitted and site solutions are documented in individual
179179
| 144 | [Customers Who Never Order](https://leetcode.com/problems/customers-who-never-order/description/) | [Solution](solutions/144_customers_who_never_order.md) | LeetCode | Easy | |
180180
| 145 | [Game Play Analysis I](https://leetcode.com/problems/game-play-analysis-i/description/) | [Solution](solutions/145_game_play_analysis_i.md) | LeetCode | Easy | |
181181
| 146 | [Department Highest Salary](https://leetcode.com/problems/department-highest-salary/description/) | [Solution](solutions/146_department_highest_salary.md) | LeetCode | Medium | |
182+
| 147 | [Customer Placing the Largest Number of Orders](https://leetcode.com/problems/customer-placing-the-largest-number-of-orders/description/) | [Solution](solutions/147_customer_placing_the_largest_number_of_orders.md) | LeetCode | Easy | `ORDER BY` w/ Aggregate Function |
182183
<!-- Index End - WARNING: Do not delete or modify this markdown comment. -->
183184

184185
## Author(s)

eevveerryyddaayy.ipynb

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,32 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": null,
5+
"execution_count": 1,
66
"metadata": {},
7-
"outputs": [],
7+
"outputs": [
8+
{
9+
"data": {
10+
"application/vnd.jupyter.widget-view+json": {
11+
"model_id": "58185a628cb44ff3a82c1c38f2ad4569",
12+
"version_major": 2,
13+
"version_minor": 0
14+
},
15+
"text/plain": [
16+
"VBox(children=(VBox(children=(HTML(value='<span style=\"font-size:20px;\"><b>EEVVEERRYYDDAAYY</b></span>', layou…"
17+
]
18+
},
19+
"metadata": {},
20+
"output_type": "display_data"
21+
},
22+
{
23+
"name": "stdout",
24+
"output_type": "stream",
25+
"text": [
26+
"Processing...\n",
27+
"Done\n"
28+
]
29+
}
30+
],
831
"source": [
932
"\"\"\"\n",
1033
"Run this cell to display the form interface.\n",
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SQL Everyday \#147
2+
3+
## Customer Placing the Largest Number of Orders
4+
5+
Site: LeetCode\
6+
Difficulty per Site: Easy
7+
8+
## Problem
9+
10+
Write a solution to find the `customer_number` for the customer who has placed *the largest number of orders*.
11+
12+
The test cases are generated so that *exactly one customer* will have placed more orders than any other customer. [[Full Description](https://leetcode.com/problems/customer-placing-the-largest-number-of-orders/description/)]
13+
14+
## Submitted Solution
15+
16+
```sql
17+
-- Submitted Solution
18+
SELECT
19+
customer_number
20+
FROM Orders
21+
GROUP BY customer_number
22+
ORDER BY COUNT(order_number) DESC
23+
LIMIT 1
24+
;
25+
```
26+
27+
## Site Solution
28+
29+
```sql
30+
-- LeetCode Solution
31+
-- TBD
32+
```
33+
34+
## Notes
35+
36+
TBD
37+
38+
## NB
39+
40+
`ORDER BY` w/ Aggregate Function
41+
42+
Go to [Index](../?tab=readme-ov-file#index)\
43+
Go to [Overview](../?tab=readme-ov-file)

0 commit comments

Comments
 (0)