|
| 1 | +# [level 4] 언어별 개발자 분류하기 - 276036 |
| 2 | + |
| 3 | +[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/276036) |
| 4 | + |
| 5 | +### 성능 요약 |
| 6 | + |
| 7 | +메모리: undefined, 시간: |
| 8 | + |
| 9 | +### 구분 |
| 10 | + |
| 11 | +코딩테스트 연습 > GROUP BY |
| 12 | + |
| 13 | +### 채점결과 |
| 14 | + |
| 15 | +합계: 100.0 / 100.0 |
| 16 | + |
| 17 | +### 제출 일자 |
| 18 | + |
| 19 | +2025년 05월 15일 16:42:07 |
| 20 | + |
| 21 | +### 문제 설명 |
| 22 | + |
| 23 | +<p><code>SKILLCODES</code> 테이블은 개발자들이 사용하는 프로그래밍 언어에 대한 정보를 담은 테이블입니다. <code>SKILLCODES</code> 테이블의 구조는 다음과 같으며, <code>NAME</code>, <code>CATEGORY</code>, <code>CODE</code>는 각각 스킬의 이름, 스킬의 범주, 스킬의 코드를 의미합니다. 스킬의 코드는 2진수로 표현했을 때 각 bit로 구분될 수 있도록 2의 제곱수로 구성되어 있습니다.</p> |
| 24 | +<table class="table"> |
| 25 | + <thead><tr> |
| 26 | +<th>NAME</th> |
| 27 | +<th>TYPE</th> |
| 28 | +<th>UNIQUE</th> |
| 29 | +<th>NULLABLE</th> |
| 30 | +</tr> |
| 31 | +</thead> |
| 32 | + <tbody><tr> |
| 33 | +<td>NAME</td> |
| 34 | +<td>VARCHAR(N)</td> |
| 35 | +<td>Y</td> |
| 36 | +<td>N</td> |
| 37 | +</tr> |
| 38 | +<tr> |
| 39 | +<td>CATEGORY</td> |
| 40 | +<td>VARCHAR(N)</td> |
| 41 | +<td>N</td> |
| 42 | +<td>N</td> |
| 43 | +</tr> |
| 44 | +<tr> |
| 45 | +<td>CODE</td> |
| 46 | +<td>INTEGER</td> |
| 47 | +<td>Y</td> |
| 48 | +<td>N</td> |
| 49 | +</tr> |
| 50 | +</tbody> |
| 51 | + </table> |
| 52 | +<p><code>DEVELOPERS</code> 테이블은 개발자들의 프로그래밍 스킬 정보를 담은 테이블입니다. <code>DEVELOPERS</code> 테이블의 구조는 다음과 같으며, <code>ID</code>, <code>FIRST_NAME</code>, <code>LAST_NAME</code>, <code>EMAIL</code>, <code>SKILL_CODE</code>는 각각 개발자의 ID, 이름, 성, 이메일, 스킬 코드를 의미합니다. <code>SKILL_CODE</code> 컬럼은 INTEGER 타입이고, 2진수로 표현했을 때 각 bit는 <code>SKILLCODES</code> 테이블의 코드를 의미합니다.</p> |
| 53 | +<table class="table"> |
| 54 | + <thead><tr> |
| 55 | +<th>NAME</th> |
| 56 | +<th>TYPE</th> |
| 57 | +<th>UNIQUE</th> |
| 58 | +<th>NULLABLE</th> |
| 59 | +</tr> |
| 60 | +</thead> |
| 61 | + <tbody><tr> |
| 62 | +<td>ID</td> |
| 63 | +<td>VARCHAR(N)</td> |
| 64 | +<td>Y</td> |
| 65 | +<td>N</td> |
| 66 | +</tr> |
| 67 | +<tr> |
| 68 | +<td>FIRST_NAME</td> |
| 69 | +<td>VARCHAR(N)</td> |
| 70 | +<td>N</td> |
| 71 | +<td>Y</td> |
| 72 | +</tr> |
| 73 | +<tr> |
| 74 | +<td>LAST_NAME</td> |
| 75 | +<td>VARCHAR(N)</td> |
| 76 | +<td>N</td> |
| 77 | +<td>Y</td> |
| 78 | +</tr> |
| 79 | +<tr> |
| 80 | +<td>EMAIL</td> |
| 81 | +<td>VARCHAR(N)</td> |
| 82 | +<td>Y</td> |
| 83 | +<td>N</td> |
| 84 | +</tr> |
| 85 | +<tr> |
| 86 | +<td>SKILL_CODE</td> |
| 87 | +<td>INTEGER</td> |
| 88 | +<td>N</td> |
| 89 | +<td>N</td> |
| 90 | +</tr> |
| 91 | +</tbody> |
| 92 | + </table> |
| 93 | +<p>예를 들어 어떤 개발자의 <code>SKILL_CODE</code>가 400 (=b'110010000')이라면, 이는 <code>SKILLCODES</code> 테이블에서 CODE가 256 (=b'100000000'), 128 (=b'10000000'), 16 (=b'10000') 에 해당하는 스킬을 가졌다는 것을 의미합니다.</p> |
| 94 | + |
| 95 | +<hr> |
| 96 | + |
| 97 | +<h5>문제</h5> |
| 98 | + |
| 99 | +<p><code>DEVELOPERS</code> 테이블에서 GRADE별 개발자의 정보를 조회하려 합니다. GRADE는 다음과 같이 정해집니다.</p> |
| 100 | + |
| 101 | +<ul> |
| 102 | +<li>A : Front End 스킬과 Python 스킬을 함께 가지고 있는 개발자</li> |
| 103 | +<li>B : C# 스킬을 가진 개발자</li> |
| 104 | +<li>C : 그 외의 Front End 개발자</li> |
| 105 | +</ul> |
| 106 | + |
| 107 | +<p>GRADE가 존재하는 개발자의 GRADE, ID, EMAIL을 조회하는 SQL 문을 작성해 주세요.</p> |
| 108 | + |
| 109 | +<p>결과는 GRADE와 ID를 기준으로 오름차순 정렬해 주세요.</p> |
| 110 | + |
| 111 | +<hr> |
| 112 | + |
| 113 | +<h5>예시</h5> |
| 114 | + |
| 115 | +<p>예를 들어 <code>SKILLCODES</code> 테이블이 다음과 같고,</p> |
| 116 | +<table class="table"> |
| 117 | + <thead><tr> |
| 118 | +<th>NAME</th> |
| 119 | +<th>CATEGORY</th> |
| 120 | +<th>CODE</th> |
| 121 | +</tr> |
| 122 | +</thead> |
| 123 | + <tbody><tr> |
| 124 | +<td>C++</td> |
| 125 | +<td>Back End</td> |
| 126 | +<td>4</td> |
| 127 | +</tr> |
| 128 | +<tr> |
| 129 | +<td>JavaScript</td> |
| 130 | +<td>Front End</td> |
| 131 | +<td>16</td> |
| 132 | +</tr> |
| 133 | +<tr> |
| 134 | +<td>Java</td> |
| 135 | +<td>Back End</td> |
| 136 | +<td>128</td> |
| 137 | +</tr> |
| 138 | +<tr> |
| 139 | +<td>Python</td> |
| 140 | +<td>Back End</td> |
| 141 | +<td>256</td> |
| 142 | +</tr> |
| 143 | +<tr> |
| 144 | +<td>C#</td> |
| 145 | +<td>Back End</td> |
| 146 | +<td>1024</td> |
| 147 | +</tr> |
| 148 | +<tr> |
| 149 | +<td>React</td> |
| 150 | +<td>Front End</td> |
| 151 | +<td>2048</td> |
| 152 | +</tr> |
| 153 | +<tr> |
| 154 | +<td>Vue</td> |
| 155 | +<td>Front End</td> |
| 156 | +<td>8192</td> |
| 157 | +</tr> |
| 158 | +<tr> |
| 159 | +<td>Node.js</td> |
| 160 | +<td>Back End</td> |
| 161 | +<td>16384</td> |
| 162 | +</tr> |
| 163 | +</tbody> |
| 164 | + </table> |
| 165 | +<p><code>DEVELOPERS</code> 테이블이 다음과 같다면</p> |
| 166 | +<table class="table"> |
| 167 | + <thead><tr> |
| 168 | +<th>ID</th> |
| 169 | +<th>FIRST_NAME</th> |
| 170 | +<th>LAST_NAME</th> |
| 171 | +<th>EMAIL</th> |
| 172 | +<th>SKILL_CODE</th> |
| 173 | +</tr> |
| 174 | +</thead> |
| 175 | + <tbody><tr> |
| 176 | +<td>D165</td> |
| 177 | +<td>Jerami</td> |
| 178 | +<td>Edwards</td> |
| 179 | +<td><code>jerami_edwards@grepp.co</code></td> |
| 180 | +<td>400</td> |
| 181 | +</tr> |
| 182 | +<tr> |
| 183 | +<td>D161</td> |
| 184 | +<td>Carsen</td> |
| 185 | +<td>Garza</td> |
| 186 | +<td><code>carsen_garza@grepp.co</code></td> |
| 187 | +<td>2048</td> |
| 188 | +</tr> |
| 189 | +<tr> |
| 190 | +<td>D164</td> |
| 191 | +<td>Kelly</td> |
| 192 | +<td>Grant</td> |
| 193 | +<td><code>kelly_grant@grepp.co</code></td> |
| 194 | +<td>1024</td> |
| 195 | +</tr> |
| 196 | +<tr> |
| 197 | +<td>D163</td> |
| 198 | +<td>Luka</td> |
| 199 | +<td>Cory</td> |
| 200 | +<td><code>luka_cory@grepp.co</code></td> |
| 201 | +<td>16384</td> |
| 202 | +</tr> |
| 203 | +<tr> |
| 204 | +<td>D162</td> |
| 205 | +<td>Cade</td> |
| 206 | +<td>Cunningham</td> |
| 207 | +<td><code>cade_cunningham@grepp.co</code></td> |
| 208 | +<td>8452</td> |
| 209 | +</tr> |
| 210 | +</tbody> |
| 211 | + </table> |
| 212 | +<p>다음과 같이 <code>DEVELOPERS</code> 테이블에 포함된 개발자들의 GRADE 및 정보가 결과에 나와야 합니다.</p> |
| 213 | +<table class="table"> |
| 214 | + <thead><tr> |
| 215 | +<th>GRADE</th> |
| 216 | +<th>ID</th> |
| 217 | +<th>EMAIL</th> |
| 218 | +</tr> |
| 219 | +</thead> |
| 220 | + <tbody><tr> |
| 221 | +<td>A</td> |
| 222 | +<td>D162</td> |
| 223 | +<td><code>cade_cunningham@grepp.co</code></td> |
| 224 | +</tr> |
| 225 | +<tr> |
| 226 | +<td>A</td> |
| 227 | +<td>D165</td> |
| 228 | +<td><code>jerami_edwards@grepp.co</code></td> |
| 229 | +</tr> |
| 230 | +<tr> |
| 231 | +<td>B</td> |
| 232 | +<td>D164</td> |
| 233 | +<td><code>kelly_grant@grepp.co</code></td> |
| 234 | +</tr> |
| 235 | +<tr> |
| 236 | +<td>C</td> |
| 237 | +<td>D161</td> |
| 238 | +<td><code>carsen_garza@grepp.co</code></td> |
| 239 | +</tr> |
| 240 | +</tbody> |
| 241 | + </table> |
| 242 | + |
| 243 | +> 출처: 프로그래머스 코딩 테스트 연습, https://school.programmers.co.kr/learn/challenges |
0 commit comments