File tree Expand file tree Collapse file tree 2 files changed +7
-14
lines changed
프로그래머스/2/131533. 상품 별 오프라인 매출 구하기 Expand file tree Collapse file tree 2 files changed +7
-14
lines changed Original file line number Diff line number Diff line change 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
1616
1717### 제출 일자
1818
19- 2025년 07월 05일 20:48:59
19+ 2025년 11월 09일 22:28:37
2020
2121### 문제 설명
2222
Original file line number Diff line number Diff line change 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
34from product as p
45join offline_sale as o
56on 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;
You can’t perform that action at this time.
0 commit comments