1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/originData/[no content]find-top-scoring-students.json
2024-06-25 01:21:44 +08:00

76 lines
9.1 KiB
JSON

{
"data": {
"question": {
"questionId": "3488",
"questionFrontendId": "3182",
"categoryTitle": "Database",
"boundTopicId": 2805903,
"title": "Find Top Scoring Students",
"titleSlug": "find-top-scoring-students",
"content": null,
"translatedTitle": "查找得分最高的学生",
"translatedContent": null,
"isPaidOnly": true,
"difficulty": "Medium",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": null,
"topicTags": [
{
"name": "Database",
"slug": "database",
"translatedName": "数据库",
"__typename": "TopicTagNode"
}
],
"companyTagStats": null,
"codeSnippets": null,
"stats": "{\"totalAccepted\": \"66\", \"totalSubmission\": \"131\", \"totalAcceptedRaw\": 66, \"totalSubmissionRaw\": 131, \"acRate\": \"50.4%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"students\":[\"student_id\",\"name\",\"major\"],\"courses\":[\"course_id\",\"name\",\"credits\",\"major\"],\"enrollments\":[\"student_id\",\"course_id\",\"semester\",\"grade\"]},\"rows\":{\"students\":[[1,\"Alice\",\"Computer Science\"],[2,\"Bob\",\"Computer Science\"],[3,\"Charlie\",\"Mathematics\"],[4,\"David\",\"Mathematics\"]],\"courses\":[[101,\"Algorithms\",3,\"Computer Science\"],[102,\"Data Structures\",3,\"Computer Science\"],[103,\"Calculus\",4,\"Mathematics\"],[104,\"Linear Algebra\",4,\"Mathematics\"]],\"enrollments\":[[1,101,\"Fall 2023\",\"A\"],[1,102,\"Fall 2023\",\"A\"],[2,101,\"Fall 2023\",\"B\"],[2,102,\"Fall 2023\",\"A\"],[3,103,\"Fall 2023\",\"A\"],[3,104,\"Fall 2023\",\"A\"],[4,103,\"Fall 2023\",\"A\"],[4,104,\"Fall 2023\",\"B\"]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE if not exists students (\\n student_id INT ,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n)\",\"CREATE TABLE if not exists courses (\\n course_id INT ,\\n name VARCHAR(255),\\n credits INT,\\n major VARCHAR(255)\\n)\\n\",\"CREATE TABLE if not exists enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(10)\\n\\n);\"],\"mssql\":[\"CREATE TABLE students (\\n student_id INT ,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n)\",\"CREATE TABLE courses (\\n course_id INT ,\\n name VARCHAR(255),\\n credits INT,\\n major VARCHAR(255)\\n)\\n\",\"CREATE TABLE enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(10)\\n\\n);\"],\"oraclesql\":[\"CREATE TABLE students (\\n student_id NUMBER ,\\n name VARCHAR2(255),\\n major VARCHAR2(255)\\n)\",\"CREATE TABLE courses (\\n course_id NUMBER,\\n name VARCHAR2(255),\\n credits NUMBER,\\n major VARCHAR2(255)\\n)\",\"CREATE TABLE enrollments (\\n student_id NUMBER,\\n course_id NUMBER,\\n semester VARCHAR2(255),\\n grade VARCHAR2(10) \\n \\n)\"],\"database\":true,\"name\":\"find_top_scoring_students\",\"pythondata\":[\"enrollments = pd.DataFrame([], columns=['student_id', 'course_id', 'semester', 'grade']).astype({\\n 'student_id': 'Int64', # Nullable integer type\\n 'course_id': 'Int64', # Nullable integer type\\n 'semester': 'object', # Object type for arbitrary strings\\n 'grade': 'object' # Object type for arbitrary strings\\n})\",\"students = pd.DataFrame([], columns=['student_id', 'name', 'major']).astype({\\n 'student_id': 'Int64', # Nullable integer type\\n 'name': 'object', # Object type for arbitrary strings, equivalent to VARCHAR\\n 'major': 'object' # Object type for arbitrary strings, equivalent to VARCHAR\\n})\",\"courses = pd.DataFrame([], columns=['course_id', 'name', 'credits', 'major']).astype({\\n 'course_id': 'Int64', # Nullable integer type\\n 'name': 'object', # Object type for arbitrary strings, equivalent to VARCHAR\\n 'credits': 'Int64', # Nullable integer type\\n 'major': 'object' # Object type for arbitrary strings, equivalent to VARCHAR\\n})\"],\"postgresql\":[\"CREATE TABLE IF NOT EXISTS students (\\n student_id INT,\\n name VARCHAR(255),\\n major VARCHAR(255)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS courses (\\n course_id INT,\\n name VARCHAR(255),\\n credits INT,\\n major VARCHAR(255)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS enrollments (\\n student_id INT,\\n course_id INT,\\n semester VARCHAR(255),\\n grade VARCHAR(10)\\n);\\n\"],\"database_schema\":{\"students\":{\"student_id\":\"INT\",\"name\":\"VARCHAR(255)\",\"major\":\"VARCHAR(255)\"},\"courses\":{\"course_id\":\"INT\",\"name\":\"VARCHAR(255)\",\"credits\":\"INT\",\"major\":\"VARCHAR(255)\"},\"enrollments\":{\"student_id\":\"INT\",\"course_id\":\"INT\",\"semester\":\"VARCHAR(255)\",\"grade\":\"VARCHAR(10)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE if not exists students (\n student_id INT ,\n name VARCHAR(255),\n major VARCHAR(255)\n)",
"CREATE TABLE if not exists courses (\n course_id INT ,\n name VARCHAR(255),\n credits INT,\n major VARCHAR(255)\n)\n",
"CREATE TABLE if not exists enrollments (\n student_id INT,\n course_id INT,\n semester VARCHAR(255),\n grade VARCHAR(10)\n\n);",
"Truncate table students",
"insert into students (student_id, name, major) values ('1', 'Alice', 'Computer Science')",
"insert into students (student_id, name, major) values ('2', 'Bob', 'Computer Science')",
"insert into students (student_id, name, major) values ('3', 'Charlie', 'Mathematics')",
"insert into students (student_id, name, major) values ('4', 'David', 'Mathematics')",
"Truncate table courses",
"insert into courses (course_id, name, credits, major) values ('101', 'Algorithms', '3', 'Computer Science')",
"insert into courses (course_id, name, credits, major) values ('102', 'Data Structures', '3', 'Computer Science')",
"insert into courses (course_id, name, credits, major) values ('103', 'Calculus', '4', 'Mathematics')",
"insert into courses (course_id, name, credits, major) values ('104', 'Linear Algebra', '4', 'Mathematics')",
"Truncate table enrollments",
"insert into enrollments (student_id, course_id, semester, grade) values ('1', '101', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('1', '102', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('2', '101', 'Fall 2023', 'B')",
"insert into enrollments (student_id, course_id, semester, grade) values ('2', '102', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('3', '103', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('3', '104', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('4', '103', 'Fall 2023', 'A')",
"insert into enrollments (student_id, course_id, semester, grade) values ('4', '104', 'Fall 2023', 'B')"
],
"enableRunCode": true,
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"students\":[\"student_id\",\"name\",\"major\"],\"courses\":[\"course_id\",\"name\",\"credits\",\"major\"],\"enrollments\":[\"student_id\",\"course_id\",\"semester\",\"grade\"]},\"rows\":{\"students\":[[1,\"Alice\",\"Computer Science\"],[2,\"Bob\",\"Computer Science\"],[3,\"Charlie\",\"Mathematics\"],[4,\"David\",\"Mathematics\"]],\"courses\":[[101,\"Algorithms\",3,\"Computer Science\"],[102,\"Data Structures\",3,\"Computer Science\"],[103,\"Calculus\",4,\"Mathematics\"],[104,\"Linear Algebra\",4,\"Mathematics\"]],\"enrollments\":[[1,101,\"Fall 2023\",\"A\"],[1,102,\"Fall 2023\",\"A\"],[2,101,\"Fall 2023\",\"B\"],[2,102,\"Fall 2023\",\"A\"],[3,103,\"Fall 2023\",\"A\"],[3,104,\"Fall 2023\",\"A\"],[4,103,\"Fall 2023\",\"A\"],[4,104,\"Fall 2023\",\"B\"]]}}",
"__typename": "QuestionNode"
}
}
}