SQL 걷기반

4) 이제 놀만큼 놀았으니 다시 공부해봅시다!

news0516 2024. 10. 14. 17:00




13. sparta_students 테이블에서 모든 학생의 이름(name)과 트랙(track)을 선택하는 쿼리를 작성해주세요!
SELECT name,
track
FROM sparta_student


14. sparta_students 테이블에서 Unity 트랙 소속이 아닌 학생들을 선택하는 쿼리를 작성해주세요!
SELECT name
FROM sparta_student
WHERE track NOT LIKE 'UNITY'
/
SELECT *
FROM sparta_students
WHERE track <> 'Unity'

 


15. sparta_students 테이블에서 입학년도(enrollment_year)가 2021년인 학생과 2023년인 학생을 선택하는 쿼리를 작성해주세요!
SELECT name
From sparta_students
WHERE enrollment_year in (2023, 2021)


16. sparta_students 테이블에서 Node.js 트랙 소속이고 학점이 ‘A’인 학생의 입학년도를 선택하는 쿼리를 작성해주세요!
SELECT enrollment_year
FROM sparta_student
WHERE track = 'Nods.js' and grade = 'A'