File tree Expand file tree Collapse file tree
프로그래머스/3/301649. 대장균의 크기에 따라 분류하기 2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# [ level 3] 대장균의 크기에 따라 분류하기 2 - 301649
22
3- [ 문제 링크] ( https://school.programmers.co.kr/learn/courses/30/lessons/301649#qna )
3+ [ 문제 링크] ( https://school.programmers.co.kr/learn/courses/30/lessons/301649 )
44
55### 성능 요약
66
1616
1717### 제출 일자
1818
19- 2024년 10월 31일 11:56:10
19+ 2025년 08월 25일 23:04:32
2020
2121### 문제 설명
2222
Original file line number Diff line number Diff line change 11-- 코드를 작성해주세요
2- select ID, (case
3- when percent_rank() over (order by SIZE_OF_COLONY desc ) <= 0 .25 then ' CRITICAL'
4- when percent_rank() over (order by SIZE_OF_COLONY desc ) <= 0 .50 then ' HIGH'
5- when percent_rank() over (order by SIZE_OF_COLONY desc ) <= 0 .75 then ' MEDIUM'
6- else ' LOW' end) as COLONY_NAME
7- from ECOLI_DATA
8- order by id
2+ WITH TEMP_COLONY_NAME AS (
3+ SELECT ID, PERCENT_RANK () OVER (ORDER BY SIZE_OF_COLONY DESC ) COLONY_PERCENT
4+ FROM ECOLI_DATA
5+ )
6+ SELECT ID,
7+ CASE
8+ WHEN COLONY_PERCENT <= 0 .25 THEN ' CRITICAL'
9+ WHEN COLONY_PERCENT <= 0 .5 THEN ' HIGH'
10+ WHEN COLONY_PERCENT <= 0 .75 THEN ' MEDIUM'
11+ ELSE ' LOW'
12+ END AS COLONY_NAME
13+ FROM TEMP_COLONY_NAME
14+ ORDER BY ID;
You can’t perform that action at this time.
0 commit comments