[SQL문제풀기] 가장 비싼 상품 구하기

silver's avatar
May 27, 2025
[SQL문제풀기] 가장 비싼 상품 구하기

문제

MYSQL

내가 작성한 정답

#1 select max(price) max_price from product; #2 select price max_price from product order by price desc limit 1;

ORACLE

내가 작성한 정답

--1 select max(price) MAX_PRICE from product; --2 select price MAX_PRICE from product order by price desc fetch first 1 rows only; --3 select price max_price from (select price from product order by price desc) where rownum = 1;
Share article

silver