We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a318a64 commit 6de624bCopy full SHA for 6de624b
1 file changed
박예진/8주차/260217.sql
@@ -0,0 +1,15 @@
1
+select
2
+ f1.category,
3
+ f1.price as max_price,
4
+ f1.product_name
5
+from food_product f1
6
+join (
7
+ select
8
+ category,
9
+ max(price) as max_price
10
+ from food_product
11
+ where category in ('과자', '국', '김치', '식용유')
12
+ group by category
13
+) f2
14
+on f1.category = f2.category and f1.price = f2.max_price
15
+order by max_price desc;
0 commit comments