2022-03-27 18:27:43 +08:00
{
"data" : {
"question" : {
"questionId" : "1579" ,
"questionFrontendId" : "1454" ,
"boundTopicId" : null ,
"title" : "Active Users" ,
"titleSlug" : "active-users" ,
"content" : null ,
"translatedTitle" : null ,
"translatedContent" : null ,
"isPaidOnly" : true ,
"difficulty" : "Medium" ,
2023-12-09 18:50:08 +08:00
"likes" : 389 ,
"dislikes" : 38 ,
2022-03-27 18:27:43 +08:00
"isLiked" : null ,
"similarQuestions" : "[]" ,
"exampleTestcases" : "{\"headers\":{\"Accounts\":[\"id\",\"name\"],\"Logins\":[\"id\",\"login_date\"]},\"rows\":{\"Accounts\":[[1,\"Winston\"],[7,\"Jonathan\"]],\"Logins\":[[7,\"2020-05-30\"],[1,\"2020-05-30\"],[7,\"2020-05-31\"],[7,\"2020-06-01\"],[7,\"2020-06-02\"],[7,\"2020-06-02\"],[7,\"2020-06-03\"],[1,\"2020-06-07\"],[7,\"2020-06-10\"]]}}" ,
"categoryTitle" : "Database" ,
"contributors" : [ ] ,
"topicTags" : [
{
"name" : "Database" ,
"slug" : "database" ,
"translatedName" : null ,
"__typename" : "TopicTagNode"
}
] ,
"companyTagStats" : null ,
"codeSnippets" : null ,
2023-12-09 19:57:46 +08:00
"stats" : "{\"totalAccepted\": \"34.9K\", \"totalSubmission\": \"94.3K\", \"totalAcceptedRaw\": 34872, \"totalSubmissionRaw\": 94329, \"acRate\": \"37.0%\"}" ,
2022-03-27 18:27:43 +08:00
"hints" : [ ] ,
"solution" : null ,
"status" : null ,
"sampleTestCase" : "{\"headers\":{\"Accounts\":[\"id\",\"name\"],\"Logins\":[\"id\",\"login_date\"]},\"rows\":{\"Accounts\":[[1,\"Winston\"],[7,\"Jonathan\"]],\"Logins\":[[7,\"2020-05-30\"],[1,\"2020-05-30\"],[7,\"2020-05-31\"],[7,\"2020-06-01\"],[7,\"2020-06-02\"],[7,\"2020-06-02\"],[7,\"2020-06-03\"],[1,\"2020-06-07\"],[7,\"2020-06-10\"]]}}" ,
2023-12-09 18:50:08 +08:00
"metaData" : "{\"mysql\": [\"Create table If Not Exists Accounts (id int, name varchar(10))\", \"Create table If Not Exists Logins (id int, login_date date)\"], \"mssql\": [\"Create table Accounts (id int, name varchar(10))\", \"Create table Logins (id int, login_date date)\"], \"oraclesql\": [\"Create table Accounts (id int, name varchar(10))\", \"Create table Logins (id int, login_date date)\", \"ALTER SESSION SET nls_date_format='YYYY-MM-DD'\"], \"database\": true, \"name\": \"active_users\", \"pythondata\": [\"Accounts = pd.DataFrame([], columns=['id', 'name']).astype({'id':'Int64', 'name':'object'})\", \"Logins = pd.DataFrame([], columns=['id', 'login_date']).astype({'id':'Int64', 'login_date':'datetime64[ns]'})\"], \"postgresql\": [\"Create table If Not Exists Accounts (id int, name varchar(10))\", \"Create table If Not Exists Logins (id int, login_date date)\"], \"database_schema\": {\"Accounts\": {\"id\": \"INT\", \"name\": \"VARCHAR(10)\"}, \"Logins\": {\"id\": \"INT\", \"login_date\": \"DATE\"}}}" ,
2022-03-27 18:27:43 +08:00
"judgerAvailable" : true ,
"judgeType" : "large" ,
"mysqlSchemas" : [
"Create table If Not Exists Accounts (id int, name varchar(10))" ,
"Create table If Not Exists Logins (id int, login_date date)" ,
"Truncate table Accounts" ,
"insert into Accounts (id, name) values ('1', 'Winston')" ,
"insert into Accounts (id, name) values ('7', 'Jonathan')" ,
"Truncate table Logins" ,
"insert into Logins (id, login_date) values ('7', '2020-05-30')" ,
"insert into Logins (id, login_date) values ('1', '2020-05-30')" ,
"insert into Logins (id, login_date) values ('7', '2020-05-31')" ,
"insert into Logins (id, login_date) values ('7', '2020-06-01')" ,
"insert into Logins (id, login_date) values ('7', '2020-06-02')" ,
"insert into Logins (id, login_date) values ('7', '2020-06-02')" ,
"insert into Logins (id, login_date) values ('7', '2020-06-03')" ,
"insert into Logins (id, login_date) values ('1', '2020-06-07')" ,
"insert into Logins (id, login_date) values ('7', '2020-06-10')"
] ,
"enableRunCode" : true ,
"enableTestMode" : false ,
"enableDebugger" : false ,
2023-12-09 18:50:08 +08:00
"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>\"]}" ,
2022-03-27 18:27:43 +08:00
"libraryUrl" : null ,
"adminUrl" : null ,
"challengeQuestion" : null ,
"__typename" : "QuestionNode"
}
}
}