Skip to content

Commit 7d7ef85

Browse files
committedMar 15, 2022
feat: add sql solution to lc problems: No.0183
No.0183.Customers Who Never Order
1 parent 567da37 commit 7d7ef85

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed
 

‎solution/0100-0199/0183.Customers Who Never Order/README.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,20 @@
4848

4949
### **SQL**
5050

51-
```
51+
```sql
5252
select Name as Customers from Customers
5353
where id not in (select CustomerId from Orders)
5454
```
5555

56+
```sql
57+
# Write your MySQL query statement below
58+
SELECT
59+
c.Name AS Customers
60+
FROM
61+
customers AS c
62+
LEFT JOIN orders AS o ON c.Id = o.CustomerId
63+
WHERE
64+
o.CustomerId IS NULL
65+
```
66+
5667
<!-- tabs:end -->

‎solution/0100-0199/0183.Customers Who Never Order/README_EN.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,20 @@ Orders table:
7777

7878
### **SQL**
7979

80-
```
80+
```sql
8181
select Name as Customers from Customers
8282
where id not in (select CustomerId from Orders)
8383
```
8484

85+
```sql
86+
# Write your MySQL query statement below
87+
SELECT
88+
c.Name AS Customers
89+
FROM
90+
customers AS c
91+
LEFT JOIN orders AS o ON c.Id = o.CustomerId
92+
WHERE
93+
o.CustomerId IS NULL
94+
```
95+
8596
<!-- tabs:end -->

0 commit comments

Comments
 (0)
Please sign in to comment.