{ "data": { "question": { "questionId": "1204", "questionFrontendId": "1107", "categoryTitle": "Database", "boundTopicId": 33149, "title": "New Users Daily Count", "titleSlug": "new-users-daily-count", "content": null, "translatedTitle": "每日新用户统计", "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 31, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"9.5K\", \"totalSubmission\": \"23K\", \"totalAcceptedRaw\": 9503, \"totalSubmissionRaw\": 23043, \"acRate\": \"41.2%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Traffic\":[\"user_id\",\"activity\",\"activity_date\"]},\"rows\":{\"Traffic\":[[1,\"login\",\"2019-05-01\"],[1,\"homepage\",\"2019-05-01\"],[1,\"logout\",\"2019-05-01\"],[2,\"login\",\"2019-06-21\"],[2,\"logout\",\"2019-06-21\"],[3,\"login\",\"2019-01-01\"],[3,\"jobs\",\"2019-01-01\"],[3,\"logout\",\"2019-01-01\"],[4,\"login\",\"2019-06-21\"],[4,\"groups\",\"2019-06-21\"],[4,\"logout\",\"2019-06-21\"],[5,\"login\",\"2019-03-01\"],[5,\"logout\",\"2019-03-01\"],[5,\"login\",\"2019-06-21\"],[5,\"logout\",\"2019-06-21\"]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Traffic (user_id int, activity ENUM('login', 'logout', 'jobs', 'groups', 'homepage'), activity_date date)\"\n ],\n \"mssql\": [\n \"Create table Traffic (user_id int, activity VARCHAR(10) NOT NULL CHECK (activity IN ('login', 'logout', 'jobs', 'groups', 'homepage')), activity_date date)\"\n ],\n \"oraclesql\": [\n \"Create table Traffic (user_id int, activity VARCHAR(10) NOT NULL CHECK (activity IN ('login', 'logout', 'jobs', 'groups', 'homepage')), activity_date date)\",\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 Traffic (user_id int, activity ENUM('login', 'logout', 'jobs', 'groups', 'homepage'), activity_date date)", "Truncate table Traffic", "insert into Traffic (user_id, activity, activity_date) values ('1', 'login', '2019-05-01')", "insert into Traffic (user_id, activity, activity_date) values ('1', 'homepage', '2019-05-01')", "insert into Traffic (user_id, activity, activity_date) values ('1', 'logout', '2019-05-01')", "insert into Traffic (user_id, activity, activity_date) values ('2', 'login', '2019-06-21')", "insert into Traffic (user_id, activity, activity_date) values ('2', 'logout', '2019-06-21')", "insert into Traffic (user_id, activity, activity_date) values ('3', 'login', '2019-01-01')", "insert into Traffic (user_id, activity, activity_date) values ('3', 'jobs', '2019-01-01')", "insert into Traffic (user_id, activity, activity_date) values ('3', 'logout', '2019-01-01')", "insert into Traffic (user_id, activity, activity_date) values ('4', 'login', '2019-06-21')", "insert into Traffic (user_id, activity, activity_date) values ('4', 'groups', '2019-06-21')", "insert into Traffic (user_id, activity, activity_date) values ('4', 'logout', '2019-06-21')", "insert into Traffic (user_id, activity, activity_date) values ('5', 'login', '2019-03-01')", "insert into Traffic (user_id, activity, activity_date) values ('5', 'logout', '2019-03-01')", "insert into Traffic (user_id, activity, activity_date) values ('5', 'login', '2019-06-21')", "insert into Traffic (user_id, activity, activity_date) values ('5', 'logout', '2019-06-21')" ], "enableRunCode": true, "envInfo": "{\"mysql\":[\"MySQL\",\"
\\u7248\\u672c\\uff1a mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\" Oracle Sql 11.2.<\\/p>\"]}",
"book": null,
"isSubscribed": false,
"isDailyQuestion": false,
"dailyRecordStatus": null,
"editorType": "CKEDITOR",
"ugcQuestionId": null,
"style": "LEETCODE",
"exampleTestcases": "{\"headers\":{\"Traffic\":[\"user_id\",\"activity\",\"activity_date\"]},\"rows\":{\"Traffic\":[[1,\"login\",\"2019-05-01\"],[1,\"homepage\",\"2019-05-01\"],[1,\"logout\",\"2019-05-01\"],[2,\"login\",\"2019-06-21\"],[2,\"logout\",\"2019-06-21\"],[3,\"login\",\"2019-01-01\"],[3,\"jobs\",\"2019-01-01\"],[3,\"logout\",\"2019-01-01\"],[4,\"login\",\"2019-06-21\"],[4,\"groups\",\"2019-06-21\"],[4,\"logout\",\"2019-06-21\"],[5,\"login\",\"2019-03-01\"],[5,\"logout\",\"2019-03-01\"],[5,\"login\",\"2019-06-21\"],[5,\"logout\",\"2019-06-21\"]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"