Question: https://leetcode.com/problems/compute...
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