You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,7 @@ The problems and both submitted and site solutions are documented in individual
180
180
| 145 |[Game Play Analysis I](https://leetcode.com/problems/game-play-analysis-i/description/)|[Solution](solutions/145_game_play_analysis_i.md)| LeetCode | Easy ||
181
181
| 146 |[Department Highest Salary](https://leetcode.com/problems/department-highest-salary/description/)|[Solution](solutions/146_department_highest_salary.md)| LeetCode | Medium ||
182
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 |
Write a solution to swap all `'f'` and `'m'` values (i.e., change all `'f'` values to `'m'` and vice versa) with a *single update statement* and no intermediate temporary tables.
11
+
12
+
Note that you must write a single update statement, *do not* write any select statement for this problem. [[Full Description](https://leetcode.com/problems/swap-salary/description/)]
13
+
14
+
## Submitted Solution
15
+
16
+
```sql
17
+
-- Submitted Solution
18
+
UPDATE Salary
19
+
SET sex = (CASE WHEN sex ='f' THEN 'm' ELSE 'f' END)
0 commit comments