1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-04 06:51:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
Files
leetcode-problemset/leetcode-cn/originData/find-students-with-study-spiral-pattern.json
2025-07-17 00:14:36 +08:00

107 lines
25 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"data": {
"question": {
"questionId": "3961",
"questionFrontendId": "3617",
"categoryTitle": "Database",
"boundTopicId": 3723935,
"title": "Find Students with Study Spiral Pattern",
"titleSlug": "find-students-with-study-spiral-pattern",
"content": "<p>Table: <code>students</code></p>\n\n<pre>\n+--------------+---------+\n| Column Name | Type |\n+--------------+---------+\n| student_id | int |\n| student_name | varchar |\n| major | varchar |\n+--------------+---------+\nstudent_id is the unique identifier for this table.\nEach row contains information about a student and their academic major.\n</pre>\n\n<p>Table: <code>study_sessions</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| session_id | int |\n| student_id | int |\n| subject | varchar |\n| session_date | date |\n| hours_studied | decimal |\n+---------------+---------+\nsession_id is the unique identifier for this table.\nEach row represents a study session by a student for a specific subject.\n</pre>\n\n<p>Write a solution to find students who follow the <strong>Study Spiral Pattern</strong>&nbsp;- students who consistently study multiple subjects in a rotating cycle.</p>\n\n<ul>\n\t<li>A Study Spiral Pattern means a student studies at least <code>3</code><strong> different subjects</strong> in a repeating sequence</li>\n\t<li>The pattern must repeat for <strong>at least </strong><code>2</code><strong> complete cycles</strong> (minimum <code>6</code> study sessions)</li>\n\t<li>Sessions must be <strong>consecutive dates</strong> with no gaps longer than <code>2</code> days between sessions</li>\n\t<li>Calculate the <strong>cycle length</strong> (number of different subjects in the pattern)</li>\n\t<li>Calculate the <strong>total study hours</strong> across all sessions in the pattern</li>\n\t<li>Only include students with cycle length of <strong>at least </strong><code>3</code><strong> subjects</strong></li>\n</ul>\n\n<p>Return <em>the result table ordered by cycle length in <strong>descending</strong> order, then by total study hours in <strong>descending</strong> order</em>.</p>\n\n<p>The result format is in the following example.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong></p>\n\n<p>students table:</p>\n\n<pre class=\"example-io\">\n+------------+--------------+------------------+\n| student_id | student_name | major |\n+------------+--------------+------------------+\n| 1 | Alice Chen | Computer Science |\n| 2 | Bob Johnson | Mathematics |\n| 3 | Carol Davis | Physics |\n| 4 | David Wilson | Chemistry |\n| 5 | Emma Brown | Biology |\n+------------+--------------+------------------+\n</pre>\n\n<p>study_sessions table:</p>\n\n<pre class=\"example-io\">\n+------------+------------+------------+--------------+---------------+\n| session_id | student_id | subject | session_date | hours_studied |\n+------------+------------+------------+--------------+---------------+\n| 1 | 1 | Math | 2023-10-01 | 2.5 |\n| 2 | 1 | Physics | 2023-10-02 | 3.0 |\n| 3 | 1 | Chemistry | 2023-10-03 | 2.0 |\n| 4 | 1 | Math | 2023-10-04 | 2.5 |\n| 5 | 1 | Physics | 2023-10-05 | 3.0 |\n| 6 | 1 | Chemistry | 2023-10-06 | 2.0 |\n| 7 | 2 | Algebra | 2023-10-01 | 4.0 |\n| 8 | 2 | Calculus | 2023-10-02 | 3.5 |\n| 9 | 2 | Statistics | 2023-10-03 | 2.5 |\n| 10 | 2 | Geometry | 2023-10-04 | 3.0 |\n| 11 | 2 | Algebra | 2023-10-05 | 4.0 |\n| 12 | 2 | Calculus | 2023-10-06 | 3.5 |\n| 13 | 2 | Statistics | 2023-10-07 | 2.5 |\n| 14 | 2 | Geometry | 2023-10-08 | 3.0 |\n| 15 | 3 | Biology | 2023-10-01 | 2.0 |\n| 16 | 3 | Chemistry | 2023-10-02 | 2.5 |\n| 17 | 3 | Biology | 2023-10-03 | 2.0 |\n| 18 | 3 | Chemistry | 2023-10-04 | 2.5 |\n| 19 | 4 | Organic | 2023-10-01 | 3.0 |\n| 20 | 4 | Physical | 2023-10-05 | 2.5 |\n+------------+------------+------------+--------------+---------------+\n</pre>\n\n<p><strong>Output:</strong></p>\n\n<pre class=\"example-io\">\n+------------+--------------+------------------+--------------+-------------------+\n| student_id | student_name | major | cycle_length | total_study_hours |\n+------------+--------------+------------------+--------------+-------------------+\n| 2 | Bob Johnson | Mathematics | 4 | 26.0 |\n| 1 | Alice Chen | Computer Science | 3 | 15.0 |\n+------------+--------------+------------------+--------------+-------------------+\n</pre>\n\n<p><strong>Explanation:</strong></p>\n\n<ul>\n\t<li><strong>Alice Chen (student_id = 1):</strong>\n\n\t<ul>\n\t\t<li>Study sequence: Math &rarr; Physics &rarr; Chemistry &rarr; Math &rarr; Physics &rarr; Chemistry</li>\n\t\t<li>Pattern: 3 subjects (Math, Physics, Chemistry) repeating for 2 complete cycles</li>\n\t\t<li>Consecutive dates: Oct 1-6 with no gaps &gt; 2 days</li>\n\t\t<li>Cycle length: 3 subjects</li>\n\t\t<li>Total hours: 2.5 + 3.0 + 2.0 + 2.5 + 3.0 + 2.0 = 15.0 hours</li>\n\t</ul>\n\t</li>\n\t<li><strong>Bob Johnson (student_id = 2):</strong>\n\t<ul>\n\t\t<li>Study sequence: Algebra &rarr; Calculus &rarr; Statistics &rarr; Geometry &rarr; Algebra &rarr; Calculus &rarr; Statistics &rarr; Geometry</li>\n\t\t<li>Pattern: 4 subjects (Algebra, Calculus, Statistics, Geometry) repeating for 2 complete cycles</li>\n\t\t<li>Consecutive dates: Oct 1-8 with no gaps &gt; 2 days</li>\n\t\t<li>Cycle length: 4 subjects</li>\n\t\t<li>Total hours: 4.0 + 3.5 + 2.5 + 3.0 + 4.0 + 3.5 + 2.5 + 3.0 = 26.0&nbsp;hours</li>\n\t</ul>\n\t</li>\n\t<li><strong>Students not included:</strong>\n\t<ul>\n\t\t<li>Carol Davis (student_id = 3): Only 2 subjects (Biology, Chemistry) - doesn&#39;t meet minimum 3 subjects requirement</li>\n\t\t<li>David Wilson (student_id = 4): Only 2 study sessions with a 4-day gap - doesn&#39;t meet consecutive dates requirement</li>\n\t\t<li>Emma Brown (student_id = 5): No study sessions recorded</li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>The result table is ordered by cycle_length in descending order, then by total_study_hours in descending order.</p>\n</div>\n",
"translatedTitle": "查找具有螺旋学习模式的学生",
"translatedContent": "<p>表:<code>students</code></p>\n\n<pre>\n+--------------+---------+\n| Column Name | Type |\n+--------------+---------+\n| student_id | int |\n| student_name | varchar |\n| major | varchar |\n+--------------+---------+\nstudent_id 是这张表的唯一主键。\n每一行包含有关学生及其学术专业的信息。\n</pre>\n\n<p>表:<code>study_sessions</code></p>\n\n<pre>\n+---------------+---------+\n| Column Name | Type |\n+---------------+---------+\n| session_id | int |\n| student_id | int |\n| subject | varchar |\n| session_date | date |\n| hours_studied | decimal |\n+---------------+---------+\nsession_id 是这张表的唯一主键。\n每一行代表一个学生针对特定学科的学习时段。\n</pre>\n\n<p>编写一个解决方案来找出遵循 <strong>螺旋学习模式</strong> 的学生——即那些持续学习多个学科并按循环周期进行学习的学生。</p>\n\n<ul>\n\t<li>螺旋学习模式意味着学生以重复的顺序学习至少 <code>3</code> 个 <strong>不同的学科</strong>。</li>\n\t<li>模式必须重复 <strong>至少</strong><strong>&nbsp;</strong><code>2</code><strong>&nbsp;个完整周期</strong>(最少&nbsp;<code>6</code>&nbsp;次学习记录)。</li>\n\t<li>两次学习记录必须是间隔不超过&nbsp;<code>2</code>&nbsp;天的 <strong>连续日期</strong>。</li>\n\t<li>计算 <strong>循环长度</strong>(模式中不同的学科数量)。</li>\n\t<li>计算模式中所有学习记录的 <strong>总学习时长</strong>。</li>\n\t<li>仅包含循环长度 <strong>至少为&nbsp;</strong><strong>&nbsp;</strong><code>3</code><strong>&nbsp;门学科</strong>&nbsp;的学生。</li>\n</ul>\n\n<p>返回结果表按循环长度 <strong>降序</strong>&nbsp;排序,然后按总学习时间 <strong>降序</strong>&nbsp;排序。</p>\n\n<p>结果格式如下所示。</p>\n\n<p>&nbsp;</p>\n\n<p><strong class=\"example\">示例:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>输入:</strong></p>\n\n<p>students 表:</p>\n\n<pre class=\"example-io\">\n+------------+--------------+------------------+\n| student_id | student_name | major |\n+------------+--------------+------------------+\n| 1 | Alice Chen | Computer Science |\n| 2 | Bob Johnson | Mathematics |\n| 3 | Carol Davis | Physics |\n| 4 | David Wilson | Chemistry |\n| 5 | Emma Brown | Biology |\n+------------+--------------+------------------+\n</pre>\n\n<p>study_sessions 表:</p>\n\n<pre class=\"example-io\">\n+------------+------------+------------+--------------+---------------+\n| session_id | student_id | subject | session_date | hours_studied |\n+------------+------------+------------+--------------+---------------+\n| 1 | 1 | Math | 2023-10-01 | 2.5 |\n| 2 | 1 | Physics | 2023-10-02 | 3.0 |\n| 3 | 1 | Chemistry | 2023-10-03 | 2.0 |\n| 4 | 1 | Math | 2023-10-04 | 2.5 |\n| 5 | 1 | Physics | 2023-10-05 | 3.0 |\n| 6 | 1 | Chemistry | 2023-10-06 | 2.0 |\n| 7 | 2 | Algebra | 2023-10-01 | 4.0 |\n| 8 | 2 | Calculus | 2023-10-02 | 3.5 |\n| 9 | 2 | Statistics | 2023-10-03 | 2.5 |\n| 10 | 2 | Geometry | 2023-10-04 | 3.0 |\n| 11 | 2 | Algebra | 2023-10-05 | 4.0 |\n| 12 | 2 | Calculus | 2023-10-06 | 3.5 |\n| 13 | 2 | Statistics | 2023-10-07 | 2.5 |\n| 14 | 2 | Geometry | 2023-10-08 | 3.0 |\n| 15 | 3 | Biology | 2023-10-01 | 2.0 |\n| 16 | 3 | Chemistry | 2023-10-02 | 2.5 |\n| 17 | 3 | Biology | 2023-10-03 | 2.0 |\n| 18 | 3 | Chemistry | 2023-10-04 | 2.5 |\n| 19 | 4 | Organic | 2023-10-01 | 3.0 |\n| 20 | 4 | Physical | 2023-10-05 | 2.5 |\n+------------+------------+------------+--------------+---------------+\n</pre>\n\n<p><strong>输出:</strong></p>\n\n<pre class=\"example-io\">\n+------------+--------------+------------------+--------------+-------------------+\n| student_id | student_name | major | cycle_length | total_study_hours |\n+------------+--------------+------------------+--------------+-------------------+\n| 2 | Bob Johnson | Mathematics | 4 | 26.0 |\n| 1 | Alice Chen | Computer Science | 3 | 15.0 |\n+------------+--------------+------------------+--------------+-------------------+\n</pre>\n\n<p><strong>解释:</strong></p>\n\n<ul>\n\t<li><strong>Alice Chen (student_id = 1):</strong>\n\n\t<ul>\n\t\t<li>学习序列Math → Physics → Chemistry → Math → Physics → Chemistry</li>\n\t\t<li>模式3 门学科MathPhysicsChemistry重复 2 个完整周期</li>\n\t\t<li>连续日期:十月 1-6没有超过 2 天的间隔</li>\n\t\t<li>循环长度3 门学科</li>\n\t\t<li>总时间2.5 + 3.0 + 2.0 + 2.5 + 3.0 + 2.0 = 15.0 小时</li>\n\t</ul>\n\t</li>\n\t<li><strong>Bob Johnson (student_id = 2):</strong>\n\t<ul>\n\t\t<li>学习序列Algebra → Calculus → Statistics → Geometry → Algebra → Calculus → Statistics → Geometry</li>\n\t\t<li>模式4 门学科AlgebraCalculusStatisticsGeometry重复 2 个完整周期</li>\n\t\t<li>连续日期:十月 1-8没有超过 2 天的间隔</li>\n\t\t<li>循环长度4 门学科</li>\n\t\t<li>总时间4.0 + 3.5 + 2.5 + 3.0 + 4.0 + 3.5 + 2.5 + 3.0 = 26.0&nbsp;小时</li>\n\t</ul>\n\t</li>\n\t<li><strong>未包含学生:</strong>\n\t<ul>\n\t\t<li>Carol Davis (student_id = 3):仅 2 门学科(生物,化学)- 未满足至少 3 门学科的要求</li>\n\t\t<li>David Wilson (student_id = 4):仅 2 次学习课程,间隔 4 天 - 不符合连续日期要求</li>\n\t\t<li>Emma Brown (student_id = 5):没有记录学习课程</li>\n\t</ul>\n\t</li>\n</ul>\n\n<p>结果表以 cycle_length 降序排序,然后以 total_study_hours 降序排序。</p>\n</div>\n",
"isPaidOnly": false,
"difficulty": "Hard",
"likes": 0,
"dislikes": 0,
"isLiked": null,
"similarQuestions": "[]",
"contributors": [],
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false, \"cangjie\": false}",
"topicTags": [],
"companyTagStats": null,
"codeSnippets": [
{
"lang": "MySQL",
"langSlug": "mysql",
"code": "# Write your MySQL query statement below",
"__typename": "CodeSnippetNode"
},
{
"lang": "MS SQL Server",
"langSlug": "mssql",
"code": "/* Write your T-SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "Oracle",
"langSlug": "oraclesql",
"code": "/* Write your PL/SQL query statement below */",
"__typename": "CodeSnippetNode"
},
{
"lang": "Pandas",
"langSlug": "pythondata",
"code": "import pandas as pd\n\ndef find_study_spiral_pattern(students: pd.DataFrame, study_sessions: pd.DataFrame) -> pd.DataFrame:\n ",
"__typename": "CodeSnippetNode"
},
{
"lang": "PostgreSQL",
"langSlug": "postgresql",
"code": "-- Write your PostgreSQL query statement below",
"__typename": "CodeSnippetNode"
}
],
"stats": "{\"totalAccepted\": \"61\", \"totalSubmission\": \"127\", \"totalAcceptedRaw\": 61, \"totalSubmissionRaw\": 127, \"acRate\": \"48.0%\"}",
"hints": [],
"solution": null,
"status": null,
"sampleTestCase": "{\"headers\":{\"students\":[\"student_id\",\"student_name\",\"major\"],\"study_sessions\":[\"session_id\",\"student_id\",\"subject\",\"session_date\",\"hours_studied\"]},\"rows\":{\"students\":[[1,\"Alice Chen\",\"Computer Science\"],[2,\"Bob Johnson\",\"Mathematics\"],[3,\"Carol Davis\",\"Physics\"],[4,\"David Wilson\",\"Chemistry\"],[5,\"Emma Brown\",\"Biology\"]],\"study_sessions\":[[1,1,\"Math\",\"2023-10-01\",2.5],[2,1,\"Physics\",\"2023-10-02\",3.0],[3,1,\"Chemistry\",\"2023-10-03\",2.0],[4,1,\"Math\",\"2023-10-04\",2.5],[5,1,\"Physics\",\"2023-10-05\",3.0],[6,1,\"Chemistry\",\"2023-10-06\",2.0],[7,2,\"Algebra\",\"2023-10-01\",4.0],[8,2,\"Calculus\",\"2023-10-02\",3.5],[9,2,\"Statistics\",\"2023-10-03\",2.5],[10,2,\"Geometry\",\"2023-10-04\",3.0],[11,2,\"Algebra\",\"2023-10-05\",4.0],[12,2,\"Calculus\",\"2023-10-06\",3.5],[13,2,\"Statistics\",\"2023-10-07\",2.5],[14,2,\"Geometry\",\"2023-10-08\",3.0],[15,3,\"Biology\",\"2023-10-01\",2.0],[16,3,\"Chemistry\",\"2023-10-02\",2.5],[17,3,\"Biology\",\"2023-10-03\",2.0],[18,3,\"Chemistry\",\"2023-10-04\",2.5],[19,4,\"Organic\",\"2023-10-01\",3.0],[20,4,\"Physical\",\"2023-10-05\",2.5]]}}",
"metaData": "{\"mysql\":[\"CREATE TABLE if not exists students (\\n student_id INT,\\n student_name VARCHAR(255),\\n major VARCHAR(100)\\n)\",\"CREATE TABLE study_sessions (\\n session_id INT,\\n student_id INT,\\n subject VARCHAR(100),\\n session_date DATE,\\n hours_studied DECIMAL(4, 2)\\n)\"],\"mssql\":[\"CREATE TABLE students (\\n student_id INT,\\n student_name VARCHAR(255),\\n major VARCHAR(100)\\n)\",\"CREATE TABLE study_sessions (\\n session_id INT,\\n student_id INT,\\n subject VARCHAR(100),\\n session_date DATE,\\n hours_studied DECIMAL(4, 2)\\n)\"],\"oraclesql\":[\"CREATE TABLE students (\\n student_id NUMBER,\\n student_name VARCHAR2(255),\\n major VARCHAR2(100)\\n)\",\"\\nCREATE TABLE study_sessions (\\n session_id NUMBER,\\n student_id NUMBER,\\n subject VARCHAR2(100),\\n session_date DATE,\\n hours_studied NUMBER(4, 2)\\n)\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"],\"database\":true,\"name\":\"find_study_spiral_pattern\",\"postgresql\":[\"CREATE TABLE IF NOT EXISTS students (\\n student_id INTEGER,\\n student_name VARCHAR(255),\\n major VARCHAR(100)\\n);\\n\",\"CREATE TABLE IF NOT EXISTS study_sessions (\\n session_id INTEGER,\\n student_id INTEGER,\\n subject VARCHAR(100),\\n session_date DATE,\\n hours_studied DECIMAL(4, 2)\\n);\\n\"],\"pythondata\":[\"students = pd.DataFrame({'student_id': pd.Series(dtype='int'), 'student_name': pd.Series(dtype='str'), 'major': pd.Series(dtype='str')})\",\"study_sessions = pd.DataFrame({'session_id': pd.Series(dtype='int'), 'student_id': pd.Series(dtype='int'), 'subject': pd.Series(dtype='str'), 'session_date': pd.Series(dtype='datetime64[ns]'), 'hours_studied': pd.Series(dtype='float')})\"],\"database_schema\":{\"students\":{\"student_id\":\"INT\",\"student_name\":\"VARCHAR(255)\",\"major\":\"VARCHAR(100)\"},\"study_sessions\":{\"session_id\":\"INT\",\"student_id\":\"INT\",\"subject\":\"VARCHAR(100)\",\"session_date\":\"DATE\",\"hours_studied\":\"DECIMAL(4, 2)\"}}}",
"judgerAvailable": true,
"judgeType": "large",
"mysqlSchemas": [
"CREATE TABLE if not exists students (\n student_id INT,\n student_name VARCHAR(255),\n major VARCHAR(100)\n)",
"CREATE TABLE study_sessions (\n session_id INT,\n student_id INT,\n subject VARCHAR(100),\n session_date DATE,\n hours_studied DECIMAL(4, 2)\n)",
"Truncate table students",
"insert into students (student_id, student_name, major) values ('1', 'Alice Chen', 'Computer Science')",
"insert into students (student_id, student_name, major) values ('2', 'Bob Johnson', 'Mathematics')",
"insert into students (student_id, student_name, major) values ('3', 'Carol Davis', 'Physics')",
"insert into students (student_id, student_name, major) values ('4', 'David Wilson', 'Chemistry')",
"insert into students (student_id, student_name, major) values ('5', 'Emma Brown', 'Biology')",
"Truncate table study_sessions",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('1', '1', 'Math', '2023-10-01', '2.5')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('2', '1', 'Physics', '2023-10-02', '3.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('3', '1', 'Chemistry', '2023-10-03', '2.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('4', '1', 'Math', '2023-10-04', '2.5')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('5', '1', 'Physics', '2023-10-05', '3.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('6', '1', 'Chemistry', '2023-10-06', '2.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('7', '2', 'Algebra', '2023-10-01', '4.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('8', '2', 'Calculus', '2023-10-02', '3.5')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('9', '2', 'Statistics', '2023-10-03', '2.5')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('10', '2', 'Geometry', '2023-10-04', '3.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('11', '2', 'Algebra', '2023-10-05', '4.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('12', '2', 'Calculus', '2023-10-06', '3.5')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('13', '2', 'Statistics', '2023-10-07', '2.5')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('14', '2', 'Geometry', '2023-10-08', '3.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('15', '3', 'Biology', '2023-10-01', '2.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('16', '3', 'Chemistry', '2023-10-02', '2.5')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('17', '3', 'Biology', '2023-10-03', '2.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('18', '3', 'Chemistry', '2023-10-04', '2.5')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('19', '4', 'Organic', '2023-10-01', '3.0')",
"insert into study_sessions (session_id, student_id, subject, session_date, hours_studied) values ('20', '4', 'Physical', '2023-10-05', '2.5')"
],
"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.2.2 and NumPy 1.26.4<\\/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\",\"student_name\",\"major\"],\"study_sessions\":[\"session_id\",\"student_id\",\"subject\",\"session_date\",\"hours_studied\"]},\"rows\":{\"students\":[[1,\"Alice Chen\",\"Computer Science\"],[2,\"Bob Johnson\",\"Mathematics\"],[3,\"Carol Davis\",\"Physics\"],[4,\"David Wilson\",\"Chemistry\"],[5,\"Emma Brown\",\"Biology\"]],\"study_sessions\":[[1,1,\"Math\",\"2023-10-01\",2.5],[2,1,\"Physics\",\"2023-10-02\",3.0],[3,1,\"Chemistry\",\"2023-10-03\",2.0],[4,1,\"Math\",\"2023-10-04\",2.5],[5,1,\"Physics\",\"2023-10-05\",3.0],[6,1,\"Chemistry\",\"2023-10-06\",2.0],[7,2,\"Algebra\",\"2023-10-01\",4.0],[8,2,\"Calculus\",\"2023-10-02\",3.5],[9,2,\"Statistics\",\"2023-10-03\",2.5],[10,2,\"Geometry\",\"2023-10-04\",3.0],[11,2,\"Algebra\",\"2023-10-05\",4.0],[12,2,\"Calculus\",\"2023-10-06\",3.5],[13,2,\"Statistics\",\"2023-10-07\",2.5],[14,2,\"Geometry\",\"2023-10-08\",3.0],[15,3,\"Biology\",\"2023-10-01\",2.0],[16,3,\"Chemistry\",\"2023-10-02\",2.5],[17,3,\"Biology\",\"2023-10-03\",2.0],[18,3,\"Chemistry\",\"2023-10-04\",2.5],[19,4,\"Organic\",\"2023-10-01\",3.0],[20,4,\"Physical\",\"2023-10-05\",2.5]]}}",
"__typename": "QuestionNode"
}
}
}