반응형
Notice
Recent Posts
Recent Comments
Link
«   2025/05   »
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

Hellow gyu`s world

프래그래머스 sql lv 4 5월 식품들의 총 매출 조회하기 풀이 in mysql 본문

데이터 분석/SQL

프래그래머스 sql lv 4 5월 식품들의 총 매출 조회하기 풀이 in mysql

규팍규 2022. 10. 13. 17:40
반응형

https://school.programmers.co.kr/learn/courses/30/lessons/131117

 

select a.product_id, b.product_name, sum(a.amount*b.price)
from food_order a, food_product b
where substring(a.produce_date , 1, 7) = '2022-05'
    and a.product_id = b.product_id
group by 1,2
order by 3 desc , 1

반응형