guopengfa
发布于 2023-09-21 / 63 阅读 / 0 评论 / 0 点赞

MySql Order By Group

MySql Order By Group

SELECT
    course_id,
    student_name,
    score,
    ROW_NUMBER() OVER (PARTITION BY course_id ORDER BY score DESC) AS row_num
FROM
    student_scores;

评论