Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cfe5ffc

Browse files
committed
고다혜: [SQL] Movie Rating_241210
1 parent ad1ccb5 commit cfe5ffc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎SQL/14주차/DH_Movie Rating.sql‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
(SELECT b.NAME `results`
2+
FROM MOVIERATING a LEFT JOIN USERS b ON a.USER_ID = b.USER_ID
3+
GROUP BY a.USER_ID
4+
ORDER BY COUNT(a.USER_ID) DESC, b.NAME ASC
5+
LIMIT 1)
6+
UNION ALL
7+
(SELECT b.title `results`
8+
FROM MOVIERATING a LEFT JOIN MOVIES b ON a.MOVIE_ID = b.MOVIE_ID
9+
WHERE CREATED_AT LIKE '2020-02-%'
10+
GROUP BY a.MOVIE_ID
11+
ORDER BY AVG(a.RATING) DESC, b.TITLE ASC
12+
LIMIT 1)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /