#정대리라는 사람의 직급을 구하시오.
SELECT office_worker
FROM employee
WHERE office_worker = (SELECT office_worker FROM employee WHERE name = '정대리')
#정대리보다 급여가 높은 사람들을 구하시오.
SELECT *
FROM employee
WHERE salary > (
SELECT salary
FROM employee
WHERE NAME = '정대리')
#직급이 사원인 사람들을 구하시오.
SELECT *
FROM employee
WHERE office_worker IN (
SELECT office_worker
FROM employee
WHERE office_worker = '사원')
SELECT postID, commentID FROM post INNER JOIN comment ON post.postID = comment.commentID;
CASE WHEN Favorites.user_id = 1
THEN 1
ELSE 0
END AS favoriteState
하나의 row를 찾는데 반복되는 것은 제외