2022-03-27 18:35:17 +08:00
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"question": {
|
|
|
|
"questionId": "1246",
|
|
|
|
"questionFrontendId": "1142",
|
|
|
|
"boundTopicId": null,
|
|
|
|
"title": "User Activity for the Past 30 Days II",
|
|
|
|
"titleSlug": "user-activity-for-the-past-30-days-ii",
|
|
|
|
"content": null,
|
|
|
|
"translatedTitle": null,
|
|
|
|
"translatedContent": null,
|
|
|
|
"isPaidOnly": true,
|
|
|
|
"difficulty": "Easy",
|
2022-05-02 23:44:12 +08:00
|
|
|
"likes": 71,
|
|
|
|
"dislikes": 287,
|
2022-03-27 18:35:17 +08:00
|
|
|
"isLiked": null,
|
|
|
|
"similarQuestions": "[]",
|
|
|
|
"exampleTestcases": "{\"headers\":{\"Activity\":[\"user_id\",\"session_id\",\"activity_date\",\"activity_type\"]},\"rows\":{\"Activity\":[[1,1,\"2019-07-20\",\"open_session\"],[1,1,\"2019-07-20\",\"scroll_down\"],[1,1,\"2019-07-20\",\"end_session\"],[2,4,\"2019-07-20\",\"open_session\"],[2,4,\"2019-07-21\",\"send_message\"],[2,4,\"2019-07-21\",\"end_session\"],[3,2,\"2019-07-21\",\"open_session\"],[3,2,\"2019-07-21\",\"send_message\"],[3,2,\"2019-07-21\",\"end_session\"],[3,5,\"2019-07-21\",\"open_session\"],[3,5,\"2019-07-21\",\"scroll_down\"],[3,5,\"2019-07-21\",\"end_session\"],[4,3,\"2019-06-25\",\"open_session\"],[4,3,\"2019-06-25\",\"end_session\"]]}}",
|
|
|
|
"categoryTitle": "Database",
|
|
|
|
"contributors": [],
|
|
|
|
"topicTags": [
|
|
|
|
{
|
|
|
|
"name": "Database",
|
|
|
|
"slug": "database",
|
|
|
|
"translatedName": null,
|
|
|
|
"__typename": "TopicTagNode"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"companyTagStats": null,
|
|
|
|
"codeSnippets": null,
|
2022-05-02 23:44:12 +08:00
|
|
|
"stats": "{\"totalAccepted\": \"30.7K\", \"totalSubmission\": \"85.5K\", \"totalAcceptedRaw\": 30696, \"totalSubmissionRaw\": 85483, \"acRate\": \"35.9%\"}",
|
2022-03-27 18:35:17 +08:00
|
|
|
"hints": [],
|
|
|
|
"solution": null,
|
|
|
|
"status": null,
|
|
|
|
"sampleTestCase": "{\"headers\":{\"Activity\":[\"user_id\",\"session_id\",\"activity_date\",\"activity_type\"]},\"rows\":{\"Activity\":[[1,1,\"2019-07-20\",\"open_session\"],[1,1,\"2019-07-20\",\"scroll_down\"],[1,1,\"2019-07-20\",\"end_session\"],[2,4,\"2019-07-20\",\"open_session\"],[2,4,\"2019-07-21\",\"send_message\"],[2,4,\"2019-07-21\",\"end_session\"],[3,2,\"2019-07-21\",\"open_session\"],[3,2,\"2019-07-21\",\"send_message\"],[3,2,\"2019-07-21\",\"end_session\"],[3,5,\"2019-07-21\",\"open_session\"],[3,5,\"2019-07-21\",\"scroll_down\"],[3,5,\"2019-07-21\",\"end_session\"],[4,3,\"2019-06-25\",\"open_session\"],[4,3,\"2019-06-25\",\"end_session\"]]}}",
|
|
|
|
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Activity (user_id int, session_id int, activity_date date, activity_type ENUM('open_session', 'end_session', 'scroll_down', 'send_message'))\"\n ],\n \"mssql\": [\n \"create table Activity (user_id int, session_id int, activity_date date, activity_type varchar(15) not null check(activity_type in ('open_session', 'end_session', 'scroll_down', 'send_message')))\"\n ],\n \"oraclesql\": [\n \"create table Activity (user_id int, session_id int, activity_date date, activity_type varchar(15) not null check(activity_type in ('open_session', 'end_session', 'scroll_down', 'send_message')))\",\n \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"\n ],\n \"database\": true\n}",
|
|
|
|
"judgerAvailable": true,
|
|
|
|
"judgeType": "large",
|
|
|
|
"mysqlSchemas": [
|
|
|
|
"Create table If Not Exists Activity (user_id int, session_id int, activity_date date, activity_type ENUM('open_session', 'end_session', 'scroll_down', 'send_message'))",
|
|
|
|
"Truncate table Activity",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('1', '1', '2019-07-20', 'open_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('1', '1', '2019-07-20', 'scroll_down')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('1', '1', '2019-07-20', 'end_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('2', '4', '2019-07-20', 'open_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('2', '4', '2019-07-21', 'send_message')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('2', '4', '2019-07-21', 'end_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('3', '2', '2019-07-21', 'open_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('3', '2', '2019-07-21', 'send_message')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('3', '2', '2019-07-21', 'end_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('3', '5', '2019-07-21', 'open_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('3', '5', '2019-07-21', 'scroll_down')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('3', '5', '2019-07-21', 'end_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('4', '3', '2019-06-25', 'open_session')",
|
|
|
|
"insert into Activity (user_id, session_id, activity_date, activity_type) values ('4', '3', '2019-06-25', 'end_session')"
|
|
|
|
],
|
|
|
|
"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>\"]}",
|
|
|
|
"libraryUrl": null,
|
|
|
|
"adminUrl": null,
|
|
|
|
"challengeQuestion": null,
|
|
|
|
"__typename": "QuestionNode"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|