Skip to content

Commit 7353c98

Browse files
committed
[level 2] Title: 상품 별 오프라인 매출 구하기, Time: 0.00 ms, Memory: 0.0 MB -BaekjoonHub
1 parent 43ab986 commit 7353c98

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

프로그래머스/2/131533. 상품 별 오프라인 매출 구하기/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [level 2] 상품 별 오프라인 매출 구하기 - 131533
22

3-
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/131533#qna)
3+
[문제 링크](https://school.programmers.co.kr/learn/courses/30/lessons/131533)
44

55
### 성능 요약
66

@@ -16,7 +16,7 @@ Empty
1616

1717
### 제출 일자
1818

19-
2025년 07월 05일 20:48:59
19+
2025년 11월 09일 22:28:37
2020

2121
### 문제 설명
2222

Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
-- 코드를 입력하세요
2-
SELECT p.product_code, sum(o.sales_amount * p.price) as sales
1+
select
2+
p.product_code,
3+
sum(sales_amount) * p.price as sales
34
from product as p
45
join offline_sale as o
56
on o.product_id = p.product_id
6-
group by o.product_id
7-
order by sales desc, p.product_code asc;
8-
9-
# SELECT
10-
# p.product_code
11-
# , SUM(p.price*o.sales_amount) AS sales
12-
# FROM product p
13-
# INNER JOIN offline_sale o ON p.product_id = o.product_id
14-
# GROUP BY p.product_code
15-
# ORDER BY sales DESC, p.product_code ASC;
7+
group by p.product_id
8+
order by sales desc, product_code;

0 commit comments

Comments
 (0)