mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-10 18:48:13 +08:00
57 lines
7.0 KiB
JSON
57 lines
7.0 KiB
JSON
{
|
|
"data": {
|
|
"question": {
|
|
"questionId": "3366",
|
|
"questionFrontendId": "3060",
|
|
"boundTopicId": null,
|
|
"title": "User Activities within Time Bounds",
|
|
"titleSlug": "user-activities-within-time-bounds",
|
|
"content": null,
|
|
"translatedTitle": null,
|
|
"translatedContent": null,
|
|
"isPaidOnly": true,
|
|
"difficulty": "Hard",
|
|
"likes": 2,
|
|
"dislikes": 1,
|
|
"isLiked": null,
|
|
"similarQuestions": "[]",
|
|
"exampleTestcases": "{\"headers\":{\"Sessions\":[\"user_id\",\"session_start\",\"session_end\",\"session_id\",\"session_type\"]},\"rows\":{\"Sessions\":[[101,\"2023-11-01 08:00:00\",\"2023-11-01 09:00:00\",1,\"Viewer\"],[101,\"2023-11-01 10:00:00\",\"2023-11-01 11:00:00\",2,\"Streamer\"],[102,\"2023-11-01 13:00:00\",\"2023-11-01 14:00:00\",3,\"Viewer\"],[102,\"2023-11-01 15:00:00\",\"2023-11-01 16:00:00\",4,\"Viewer\"],[101,\"2023-11-02 09:00:00\",\"2023-11-02 10:00:00\",5,\"Viewer\"],[102,\"2023-11-02 12:00:00\",\"2023-11-02 13:00:00\",6,\"Streamer\"],[101,\"2023-11-02 13:00:00\",\"2023-11-02 14:00:00\",7,\"Streamer\"],[102,\"2023-11-02 16:00:00\",\"2023-11-02 17:00:00\",8,\"Viewer\"],[103,\"2023-11-01 08:00:00\",\"2023-11-01 09:00:00\",9,\"Viewer\"],[103,\"2023-11-02 20:00:00\",\"2023-11-02 23:00:00\",10,\"Viewer\"],[103,\"2023-11-03 09:00:00\",\"2023-11-03 10:00:00\",11,\"Viewer\"]]}}",
|
|
"categoryTitle": "Database",
|
|
"contributors": [],
|
|
"topicTags": [],
|
|
"companyTagStats": null,
|
|
"codeSnippets": null,
|
|
"stats": "{\"totalAccepted\": \"116\", \"totalSubmission\": \"279\", \"totalAcceptedRaw\": 116, \"totalSubmissionRaw\": 279, \"acRate\": \"41.6%\"}",
|
|
"hints": [],
|
|
"solution": null,
|
|
"status": null,
|
|
"sampleTestCase": "{\"headers\":{\"Sessions\":[\"user_id\",\"session_start\",\"session_end\",\"session_id\",\"session_type\"]},\"rows\":{\"Sessions\":[[101,\"2023-11-01 08:00:00\",\"2023-11-01 09:00:00\",1,\"Viewer\"],[101,\"2023-11-01 10:00:00\",\"2023-11-01 11:00:00\",2,\"Streamer\"],[102,\"2023-11-01 13:00:00\",\"2023-11-01 14:00:00\",3,\"Viewer\"],[102,\"2023-11-01 15:00:00\",\"2023-11-01 16:00:00\",4,\"Viewer\"],[101,\"2023-11-02 09:00:00\",\"2023-11-02 10:00:00\",5,\"Viewer\"],[102,\"2023-11-02 12:00:00\",\"2023-11-02 13:00:00\",6,\"Streamer\"],[101,\"2023-11-02 13:00:00\",\"2023-11-02 14:00:00\",7,\"Streamer\"],[102,\"2023-11-02 16:00:00\",\"2023-11-02 17:00:00\",8,\"Viewer\"],[103,\"2023-11-01 08:00:00\",\"2023-11-01 09:00:00\",9,\"Viewer\"],[103,\"2023-11-02 20:00:00\",\"2023-11-02 23:00:00\",10,\"Viewer\"],[103,\"2023-11-03 09:00:00\",\"2023-11-03 10:00:00\",11,\"Viewer\"]]}}",
|
|
"metaData": "{\"mysql\": [\"Create table If Not Exists Sessions (user_id int, session_start datetime, session_end datetime, session_id int, session_type ENUM('Viewer','Streamer'))\"], \"mssql\": [\"Create table Sessions (user_id int, session_start datetime, session_end datetime, session_id int, session_type varchar(20) NOT NULL CHECK (session_type in ('Viewer', 'Streamer' )))\"], \"oraclesql\": [\"Create table Sessions (user_id int, session_start date, session_end date, session_id int, session_type varchar(20) NOT NULL CHECK (session_type in ('Viewer', 'Streamer' )))\", \"ALTER SESSION SET nls_date_format='YYYY-MM-DD HH24:MI:SS'\"], \"database\": true, \"name\": \"user_activities\", \"postgresql\": [\"CREATE TABLE Sessions (\\n user_id INT,\\n session_start TIMESTAMP,\\n session_end TIMESTAMP,\\n session_id INT,\\n session_type VARCHAR(20) NOT NULL CHECK (session_type IN ('Viewer', 'Streamer'))\\n);\\n\"], \"pythondata\": [\"Sessions = pd.DataFrame(columns=['user_id', 'session_start', 'session_end', 'session_id', 'session_type']).astype({'user_id': 'Int64', 'session_start': 'datetime64[ns]', 'session_end': 'datetime64[ns]', 'session_id': 'Int64', 'session_type': 'object'})\\n\"], \"database_schema\": {\"Sessions\": {\"user_id\": \"INT\", \"session_start\": \"DATETIME\", \"session_end\": \"DATETIME\", \"session_id\": \"INT\", \"session_type\": \"ENUM('Viewer', 'Streamer')\"}}}",
|
|
"judgerAvailable": true,
|
|
"judgeType": "large",
|
|
"mysqlSchemas": [
|
|
"Create table If Not Exists Sessions (user_id int, session_start datetime, session_end datetime, session_id int, session_type ENUM('Viewer','Streamer'))",
|
|
"Truncate table Sessions",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('101', '2023-11-01 08:00:00', '2023-11-01 09:00:00', '1', 'Viewer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('101', '2023-11-01 10:00:00', '2023-11-01 11:00:00', '2', 'Streamer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('102', '2023-11-01 13:00:00', '2023-11-01 14:00:00', '3', 'Viewer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('102', '2023-11-01 15:00:00', '2023-11-01 16:00:00', '4', 'Viewer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('101', '2023-11-02 09:00:00', '2023-11-02 10:00:00', '5', 'Viewer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('102', '2023-11-02 12:00:00', '2023-11-02 13:00:00', '6', 'Streamer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('101', '2023-11-02 13:00:00', '2023-11-02 14:00:00', '7', 'Streamer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('102', '2023-11-02 16:00:00', '2023-11-02 17:00:00', '8', 'Viewer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('103', '2023-11-01 08:00:00', '2023-11-01 09:00:00', '9', 'Viewer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('103', '2023-11-02 20:00:00', '2023-11-02 23:00:00', '10', 'Viewer')",
|
|
"insert into Sessions (user_id, session_start, session_end, session_id, session_type) values ('103', '2023-11-03 09:00:00', '2023-11-03 10:00:00', '11', 'Viewer')"
|
|
],
|
|
"enableRunCode": true,
|
|
"enableTestMode": false,
|
|
"enableDebugger": false,
|
|
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"], \"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"], \"postgresql\": [\"PostgreSQL\", \"<p>PostgreSQL 16</p>\"]}",
|
|
"libraryUrl": null,
|
|
"adminUrl": null,
|
|
"challengeQuestion": null,
|
|
"__typename": "QuestionNode"
|
|
}
|
|
}
|
|
} |