2025/04/17 4

[LeetCode - Pandas] (Easy) 1378. Replace Employee ID With The Unique Identifier

Table: Employees+---------------+---------+| Column Name | Type |+---------------+---------+| id | int || name | varchar |+---------------+---------+ id는 이 테이블의 기본 키(고유한 값을 가진 열)입니다. 이 테이블의 각 행은 회사에서 일하는 직원의 id와 이름을 포함합니다. Table: EmployeeUNI+---------------+---------+| Column Name | Type |+---------------+---------+| id | int || unique_id | in..

[StrataScratch - SQL] (Easy) Find all posts which were reacted to with a heart

문제 하트로 반응한 모든 게시물을 찾아주세요. 그런 게시물에 대해서는 facebook_posts 테이블의 모든 열을 출력해주세요. 테이블설명 예상결과 ✏️ 풀이SELECT DISTINCT p.*FROM facebook_posts AS pINNER JOIN facebook_reactions AS r ON p.poster = r.poster AND p.post_id = r.post_idWHERE reaction = 'heart';JOIN할 때 post_id와 poster 두 개의 조건을 줘야 한다