LeetCode SQL Medium

Watch and track your favorite playlist.

Curated by: Everyday Data Science (140 videos)


Currently Playing: Leetcode MEDIUM 2346 - Compute RANK as Percentage - RANK & COUNT WINDOW Functions - Explained by EDS

Question: https://leetcode.com/problems/compute-the-rank-as-a-percentage/description/ SQL Schema: Create table If Not Exists Students (student_id int, department_id int, mark int) Truncate table Students insert into Students (student_id, department_id, mark) values ('2', '2', '650') insert into Students (student_id, department_id, mark) values ('8', '2', '650') insert into Students (student_id, department_id, mark) values ('7', '1', '920') insert into Students (student_id, department_id, mark) values ('1', '1', '610') insert into Students (student_id, department_id, mark) values ('3', '1', '530') Pandas Schema: data = [[2, 2, 650], [8, 2, 650], [7, 1, 920], [1, 1, 610], [3, 1, 530]] students = pd.DataFrame(data, columns=['student_id', 'department_id', 'mark']).astype({'student_id':'Int64', 'department_id':'Int64', 'mark':'Int64'}) #datascience #mysqltutorials #leetcodesolutions


Tracks in this Playlist