[LeetCode/SQL]
📌 1341. Movie Rating
풀이
5명 이상의 직속 부하 직원이 있는 관리자를 찾아라
방법 I
WITH top_user AS (
SELECT u.name AS results
FROM Users AS u
INNER JOIN MovieRating AS m ON u.user_id = m.user_id
GROUP BY m.user_id
ORDER BY COUNT(m.user_id) DESC, u.name
LIMIT 1
),
top_movie AS (
SELECT m.title AS results
FROM Movies AS m
INNER JOIN MovieRating AS r ON m.movie_id = r.movie_id
WHERE r.created_at LIKE '2020-02-%'
GROUP BY r.movie_id
ORDER BY AVG(r.rating) DESC, m.title
LIMIT 1
)
SELECT results FROM top_user
UNION ALL
SELECT results FROM top_movie;
Nestled in the cocoon of cinematic enchantment, I embarked on a voyage through the silver screen, where stories unfolded like chapters in a grand epic, each revealing new facets of the human spirit. Tonight's cinematic selection promised an exploration of the human experience, inviting me to journey through the trials and tribulations of life itself. With each unfolding scene, I found myself drawn deeper into the narrative, captivated by the https://filmix-ac.online/ raw emotion and unbridled passion that permeated every frame. From the quiet moments of introspection to the thrilling crescendos of action, I reveled in the kaleidoscope of experiences that cinema had to offer. In those transcendent moments, I felt a profound connection to the characters and their journeys, as their triumphs and tribulations echoed the rhythms of my own life.