Skip to content

Commit

Permalink
2024-02-28 17:00:18
Browse files Browse the repository at this point in the history
Affected files:
src/content/blog/programmers-즐겨찾기가-가장-많은 식당-정보-출력하기.md
  • Loading branch information
gyunseo committed Feb 28, 2024
1 parent 48f1b97 commit 93a1c39
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ ORDER BY food_type DESC;
그래서 SQL Query를 다음과 같이 변경하면 더 좋은 쿼리문이 될 거 같네요.

```sql

SELECT food_type, rest_id, rest_name, favorites
FROM rest_info
WHERE (food_type, favorites) in (
SELECT food_type, MAX(favorites)
FROM rest_info
GROUP BY food_type
)
ORDER BY food_type DESC;
```

## 틀린 첫번째 SQL Query
Expand Down

0 comments on commit 93a1c39

Please sign in to comment.