한량처럼 살고 싶다

[엘리스 SQL] SQL 문제집 - 두 번째 이야기 문제 모음 본문

PS/SQL

[엘리스 SQL] SQL 문제집 - 두 번째 이야기 문제 모음

투영 2024. 3. 9. 17:02

https://hrd-demo.elice.io/courses/4998/lectures/all

 

SQL 문제집 | hrd-demo

나의 SQL 실력을 테스트 해보세요!

hrd-demo.elice.io

 

1. 출력 순서 바꾸기

SELECT name, caution from student 
order by caution desc;

 

2. 기숙사 퇴사 처리하기

select name, caution from student where name='Dodo';
delete from student where name = 'Dodo';
select * from student;

 

3. 파이데이

select name, grade from student where name like '%pi%';

 

4. 방 배정상태 확인

select room, count(*) from student
group by room;

 

5. 빈 방 찾아내기

select room from student
group by room 
having count(room) < 2;