Skip to content

Commit 20735c5

Browse files
committed
[level 2] Title: 3월에 태어난 여성 회원 목록 출력하기, Time: 0.00 ms, Memory: 0.0 MB -BaekjoonHub
1 parent 3bea928 commit 20735c5

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
SELECT MEMBER_ID, MEMBER_NAME, GENDER, DATE_FORMAT(DATE_OF_BIRTH, '%Y-%m-%d')
2+
FROM MEMBER_PROFILE
3+
WHERE GENDER = 'W' and DATE_OF_BIRTH like '%-03-%' and TLNO is not null
4+
order by MEMBER_ID ASC
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# [level 2] 3월에 태어난 여성 회원 목록 출력하기 - 131120
2+
3+
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/131120)
4+
5+
### 성능 요약
6+
7+
메모리: 0.0 MB, 시간: 0.00 ms
8+
9+
### 구분
10+
11+
코딩테스트 연습 > SELECT
12+
13+
### 채점결과
14+
15+
Empty
16+
17+
### 제출 일자
18+
19+
2025년 01월 19일 11:51:43
20+
21+
### 문제 설명
22+
23+
<p>다음은 식당 리뷰 사이트의 회원 정보를 담은 <code>MEMBER_PROFILE</code> 테이블입니다. <code>MEMBER_PROFILE</code> 테이블은 다음과 같으며 <code>MEMBER_ID</code>, <code>MEMBER_NAME</code>, <code>TLNO</code>, <code>GENDER</code>, <code>DATE_OF_BIRTH</code>는 회원 ID, 회원 이름, 회원 연락처, 성별, 생년월일을 의미합니다.</p>
24+
<table class="table">
25+
<thead><tr>
26+
<th>Column name</th>
27+
<th>Type</th>
28+
<th>Nullable</th>
29+
</tr>
30+
</thead>
31+
<tbody><tr>
32+
<td>MEMBER_ID</td>
33+
<td>VARCHAR(100)</td>
34+
<td>FALSE</td>
35+
</tr>
36+
<tr>
37+
<td>MEMBER_NAME</td>
38+
<td>VARCHAR(50)</td>
39+
<td>FALSE</td>
40+
</tr>
41+
<tr>
42+
<td>TLNO</td>
43+
<td>VARCHAR(50)</td>
44+
<td>TRUE</td>
45+
</tr>
46+
<tr>
47+
<td>GENDER</td>
48+
<td>VARCHAR(1)</td>
49+
<td>TRUE</td>
50+
</tr>
51+
<tr>
52+
<td>DATE_OF_BIRTH</td>
53+
<td>DATE</td>
54+
<td>TRUE</td>
55+
</tr>
56+
</tbody>
57+
</table>
58+
<hr>
59+
60+
<h5>문제</h5>
61+
62+
<p><code>MEMBER_PROFILE</code> 테이블에서 생일이 3월인 여성 회원의 ID, 이름, 성별, 생년월일을 조회하는 SQL문을 작성해주세요. 이때 전화번호가 NULL인 경우는 출력대상에서 제외시켜 주시고, 결과는 회원ID를 기준으로 오름차순 정렬해주세요. </p>
63+
64+
<hr>
65+
66+
<h5>예시</h5>
67+
68+
<p><code>MEMBER_PROFILE</code> 테이블이 다음과 같을 때</p>
69+
<table class="table">
70+
<thead><tr>
71+
<th>MEMBER_ID</th>
72+
<th>MEMBER_NAME</th>
73+
<th>TLNO</th>
74+
<th>GENDER</th>
75+
<th>DATE_OF_BIRTH</th>
76+
</tr>
77+
</thead>
78+
<tbody></tbody>
79+
</table>
80+
<p>| <code>jiho92@naver.com</code> | 이지호 | 01076432111 | W | 1992-02-12 |<br>
81+
| <code>jiyoon22@hotmail.com</code> | 김지윤 | 01032324117 | W | 1992-02-22 |<br>
82+
| <code>jihoon93@hanmail.net</code> | 김지훈 | 01023258688 | M | 1993-02-23 |<br>
83+
| <code>seoyeons@naver.com</code> | 박서연 | 01076482209 | W | 1993-03-16 |<br>
84+
| <code>yoonsy94@gmail.com</code> | 윤서연 | NULL | W | 1994-03-19 | </p>
85+
86+
<p>SQL을 실행하면 다음과 같이 출력되어야 합니다.</p>
87+
<table class="table">
88+
<thead><tr>
89+
<th>MEMBER_ID</th>
90+
<th>MEMBER_NAME</th>
91+
<th>GENDER</th>
92+
<th>DATE_OF_BIRTH</th>
93+
</tr>
94+
</thead>
95+
<tbody><tr>
96+
<td><code>seoyeons@naver.com</code></td>
97+
<td>박서연</td>
98+
<td>W</td>
99+
<td>1993-03-16</td>
100+
</tr>
101+
</tbody>
102+
</table>
103+
<hr>
104+
105+
<h5>주의사항</h5>
106+
107+
<p><code>DATE_OF_BIRTH</code>의 데이트 포맷이 예시와 동일해야 정답처리 됩니다.</p>
108+
109+
110+
> 출처: 프로그래머스 코딩 테스트 연습, https://school.programmers.co.kr/learn/challenges

0 commit comments

Comments
 (0)