문제
입력 코드
1.
SELECT P.product_name, S.year, S.price
FROM Sales AS S
LEFT JOIN Product AS P
ON S.product_id = P.product_id
2.
SELECT P.product_name, S.year, S.price
FROM Sales AS S, Product AS P
WHERE S.product_id = P.product_id
3.
SELECT P.product_name, S.year, S.price
FROM Sales AS S
JOIN Product AS P
USING (product_id)
코드 설명
#SELECT #JOIN #LEFT JOIN #WHERE #USING
문제 출처
'SQL' 카테고리의 다른 글
#83. [LeetCode / MySQL] 197. Rising Temperature (0) | 2023.09.09 |
---|---|
#82. [LeetCode / MySQL] 1581. Customer Who Visited but Did Not Make Any Transactions (0) | 2023.09.08 |
#80. [LeetCode / MySQL] 1378. Replace Employee ID With The Unique Identifier (0) | 2023.09.06 |
#79. [LeetCode / MySQL] 1683. Invalid Tweets (0) | 2023.09.05 |
#78. [LeetCode / MySQL] 1148. Article Views I (0) | 2023.09.04 |