본문으로 바로가기
728x90
반응형

문제 설명

 

 


문제

 

 

반응형

풀이

 

 

 

1
2
3
4
5
6
7
SELECT b.author_id, a.author_name, b.category, sum(s.sales*b.price)
FROM book b, author a, book_sales s
WHERE b.author_id = a.author_id 
and b.book_id = s.book_id
and to_char(s.sales_date, 'YYYY-MM'= '2022-01'
GROUP BY b.author_id, a.author_name, b.category
ORDER BY 13 desc;
cs

 

728x90
반응형