ji-0630 / CodingTest

코딩테스트 연습 기록
0 stars 0 forks source link

조건에 맞는 사용자와 총 거래금액 조회하기 #212

Closed ji-0630 closed 1 year ago

ji-0630 commented 1 year ago

문제 설명

image image

ji-0630 commented 1 year ago

나의 풀이


SELECT u.USER_ID, u.NICKNAME, sum(b.PRICE) as TOTAL_SALES
from USED_GOODS_BOARD b, USED_GOODS_USER u
where b.WRITER_ID = u.USER_ID
and b.STATUS = "DONE"
group by u.USER_ID
having TOTAL_SALES >= 700000
order by TOTAL_SALES