2022-03-27 20:37:52 +08:00
|
|
|
{
|
|
|
|
"data": {
|
|
|
|
"question": {
|
|
|
|
"questionId": "1246",
|
|
|
|
"questionFrontendId": "1142",
|
|
|
|
"categoryTitle": "Database",
|
|
|
|
"boundTopicId": 33168,
|
|
|
|
"title": "User Activity for the Past 30 Days II",
|
|
|
|
"titleSlug": "user-activity-for-the-past-30-days-ii",
|
|
|
|
"content": null,
|
|
|
|
"translatedTitle": "过去30天的用户活动 II",
|
|
|
|
"translatedContent": null,
|
|
|
|
"isPaidOnly": true,
|
|
|
|
"difficulty": "Easy",
|
2023-12-09 18:42:21 +08:00
|
|
|
"likes": 29,
|
2022-03-27 20:37:52 +08:00
|
|
|
"dislikes": 0,
|
|
|
|
"isLiked": null,
|
|
|
|
"similarQuestions": "[]",
|
|
|
|
"contributors": [],
|
|
|
|
"langToValidPlayground": null,
|
|
|
|
"topicTags": [
|
|
|
|
{
|
|
|
|
"name": "Database",
|
|
|
|
"slug": "database",
|
|
|
|
"translatedName": "数据库",
|
|
|
|
"__typename": "TopicTagNode"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"companyTagStats": null,
|
|
|
|
"codeSnippets": null,
|
2023-12-09 18:42:21 +08:00
|
|
|
"stats": "{\"totalAccepted\": \"13.1K\", \"totalSubmission\": \"35.5K\", \"totalAcceptedRaw\": 13100, \"totalSubmissionRaw\": 35457, \"acRate\": \"36.9%\"}",
|
2022-03-27 20:37:52 +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\"]]}}",
|
2023-12-09 18:42:21 +08:00
|
|
|
"metaData": "{\"mysql\":[\"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'))\"],\"mssql\":[\"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')))\"],\"oraclesql\":[\"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')))\",\"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"],\"database\":true,\"name\":\"user_activity\",\"pythondata\":[\"Activity = pd.DataFrame([], columns=['user_id', 'session_id', 'activity_date', 'activity_type']).astype({'user_id':'Int64', 'session_id':'Int64', 'activity_date':'datetime64[ns]', 'activity_type':'object'})\"],\"postgresql\":[\"Create table If Not Exists Activity (user_id int, session_id int, activity_date date, activity_type VARCHAR(30) CHECK (activity_type IN ('open_session', 'end_session', 'scroll_down', 'send_message')))\\n\"],\"database_schema\":{\"Activity\":{\"user_id\":\"INT\",\"session_id\":\"INT\",\"activity_date\":\"DATE\",\"activity_type\":\"ENUM('open_session', 'end_session', 'scroll_down', 'send_message')\"}}}",
|
2022-03-27 20:37:52 +08:00
|
|
|
"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,
|
2023-12-09 18:42:21 +08:00
|
|
|
"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>\"]}",
|
2022-03-27 20:37:52 +08:00
|
|
|
"book": null,
|
|
|
|
"isSubscribed": false,
|
|
|
|
"isDailyQuestion": false,
|
|
|
|
"dailyRecordStatus": null,
|
|
|
|
"editorType": "CKEDITOR",
|
|
|
|
"ugcQuestionId": null,
|
|
|
|
"style": "LEETCODE",
|
|
|
|
"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\"]]}}",
|
|
|
|
"__typename": "QuestionNode"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|