Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- HTML
- CSS
- 교차 엔트로피
- programmers
- RLIKE
- github
- hackerrank
- PYTHON
- L1정규화
- 클라우드컴퓨팅
- 깃헙협업
- leetcode
- 코딩공부
- elastic net
- mysql
- early stopping
- 온라인협업
- coding
- L2정규화
- 선형 모형
- conflict
- sql
- window function
- full request
- branch
- Git
- 버전충돌
- 편향-분산 교환
- AWS
- merge
Archives
- Today
- Total
Im between cherry
Leet Code | MySQL | 627. Swap Salary 본문
627. Swap Salary
https://leetcode.com/problems/swap-salary/
Swap Salary - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
Given a table salary, such as the one below, that has m=male and f=female values. 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 temp table.
Note that you must write a single update statement, DO NOT write any select statement for this problem.
After running your update statement, the above salary table should have the following rows:
UPDATE salary
SET sex = CASE
WHEN sex = 'f' THEN 'm'
ELSE 'f'
END
'데이터분석 > practice_query' 카테고리의 다른 글
Leet Code | MySQL | 180. Consecutive Numbers (0) | 2020.08.30 |
---|---|
Leet Code | MySQL | 196. Delete Duplicate Emails (0) | 2020.08.30 |
Leet Code | MySQL | 181. Employees Earning More Than Their Managers (0) | 2020.08.30 |
Hackerrank | MySQL | The Report (0) | 2020.08.30 |
Hackerrank | MySQL | Challenges (0) | 2020.08.29 |
Comments