Skip to content

Commit a8ad01d

Browse files
committed
feat: add solutions lc problem: No.1607
No.1607.Sellers With No Sales
1 parent 2a5c1d4 commit a8ad01d

File tree

5 files changed

+67
-2
lines changed

5 files changed

+67
-2
lines changed

solution/1600-1699/1607.Sellers With No Sales/README.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,17 @@ Frank在2019年卖出1次, 在2020年没有卖出.</pre>
113113
### **SQL**
114114

115115
```sql
116-
116+
# Write your MySQL query statement below
117+
select
118+
seller_name
119+
from
120+
seller s
121+
left join orders o on s.seller_id = o.seller_id
122+
and year(sale_date) = '2020'
123+
where
124+
o.seller_id is null
125+
order by
126+
seller_name
117127
```
118128

119129
<!-- tabs:end -->

solution/1600-1699/1607.Sellers With No Sales/README_EN.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,17 @@ Frank made 1 sale in 2019 but no sales in 2020.
109109
### **SQL**
110110

111111
```sql
112-
112+
# Write your MySQL query statement below
113+
select
114+
seller_name
115+
from
116+
seller s
117+
left join orders o on s.seller_id = o.seller_id
118+
and year(sale_date) = '2020'
119+
where
120+
o.seller_id is null
121+
order by
122+
seller_name
113123
```
114124

115125
<!-- tabs:end -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Write your MySQL query statement below
2+
select
3+
seller_name
4+
from
5+
seller s
6+
left join orders o on s.seller_id = o.seller_id
7+
and year(sale_date) = '2020'
8+
where
9+
o.seller_id is null
10+
order by
11+
seller_name

solution/1800-1899/1873.Calculate Special Bonus/README.md

+17
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,21 @@ FROM
9898
employees;
9999
```
100100

101+
```sql
102+
# Write your MySQL query statement below
103+
SELECT
104+
employee_id,
105+
CASE
106+
WHEN (
107+
employee_id % 2 = 1
108+
AND NAME NOT LIKE "M%"
109+
) THEN salary
110+
ELSE 0
111+
END AS bonus
112+
FROM
113+
Employees
114+
ORDER BY
115+
employee_id
116+
```
117+
101118
<!-- tabs:end -->

solution/1800-1899/1873.Calculate Special Bonus/README_EN.md

+17
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,21 @@ FROM
9090
employees;
9191
```
9292

93+
```sql
94+
# Write your MySQL query statement below
95+
SELECT
96+
employee_id,
97+
CASE
98+
WHEN (
99+
employee_id % 2 = 1
100+
AND NAME NOT LIKE "M%"
101+
) THEN salary
102+
ELSE 0
103+
END AS bonus
104+
FROM
105+
Employees
106+
ORDER BY
107+
employee_id
108+
```
109+
93110
<!-- tabs:end -->

0 commit comments

Comments
 (0)