
문제
https://leetcode.com/problems/product-sales-analysis-i/description/
문제 설명
- 두 테이블이 주어졌을 때,
- Sales (컬럼 : sale_id, product_id, year, quantity, price
- Product (컬럼 : product_id, product_name)
- 각 판매 내역별로 다음 정보를 리턴 (product_name, year, price)
정답 코드
SELECT p.product_name, s.year, s.price
FROM sales AS s JOIN product AS p ON s.product_id = p.product_id'코딩 테스트 연습 > [프로그래머스][리트코드] MySQL' 카테고리의 다른 글
| 197. Rising Temperature ⭐️ (0) | 2025.08.21 |
|---|---|
| 1581. Customer Who Visited but Did Not Make Any Transactions (0) | 2025.08.19 |
| 1378. Replace Employee ID With The Unique Identifier (1) | 2025.08.13 |
| 1683. Invalid Tweets (0) | 2025.08.11 |
| 1148. Article Views I (1) | 2025.08.07 |