2022-03-27 18:35:17 +08:00
{
"data" : {
"question" : {
"questionId" : "574" ,
"questionFrontendId" : "574" ,
"boundTopicId" : null ,
"title" : "Winning Candidate" ,
"titleSlug" : "winning-candidate" ,
"content" : null ,
"translatedTitle" : null ,
"translatedContent" : null ,
"isPaidOnly" : true ,
"difficulty" : "Medium" ,
2023-12-09 18:42:21 +08:00
"likes" : 165 ,
"dislikes" : 414 ,
2022-03-27 18:35:17 +08:00
"isLiked" : null ,
"similarQuestions" : "[]" ,
"exampleTestcases" : "{\"headers\":{\"Candidate\":[\"id\",\"name\"],\"Vote\":[\"id\",\"candidateId\"]},\"rows\":{\"Candidate\":[[1,\"A\"],[2,\"B\"],[3,\"C\"],[4,\"D\"],[5,\"E\"]],\"Vote\":[[1,2],[2,4],[3,3],[4,2],[5,5]]}}" ,
"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\": \"60.5K\", \"totalSubmission\": \"100.5K\", \"totalAcceptedRaw\": 60494, \"totalSubmissionRaw\": 100474, \"acRate\": \"60.2%\"}" ,
2022-03-27 18:35:17 +08:00
"hints" : [ ] ,
"solution" : {
"id" : "208" ,
2023-12-09 18:42:21 +08:00
"canSeeDetail" : false ,
"paidOnly" : true ,
2022-03-27 18:35:17 +08:00
"hasVideoSolution" : false ,
"paidOnlyVideo" : true ,
"__typename" : "ArticleNode"
} ,
"status" : null ,
"sampleTestCase" : "{\"headers\":{\"Candidate\":[\"id\",\"name\"],\"Vote\":[\"id\",\"candidateId\"]},\"rows\":{\"Candidate\":[[1,\"A\"],[2,\"B\"],[3,\"C\"],[4,\"D\"],[5,\"E\"]],\"Vote\":[[1,2],[2,4],[3,3],[4,2],[5,5]]}}" ,
2023-12-09 18:42:21 +08:00
"metaData" : "{\"mysql\": [\"Create table If Not Exists Candidate (id int, name varchar(255))\", \"Create table If Not Exists Vote (id int, candidateId int)\"], \"mssql\": [\"Create table Candidate (id int, name varchar(255))\", \"Create table Vote (id int, candidateId int)\"], \"oraclesql\": [\"Create table Candidate (id int, name varchar(255))\", \"Create table Vote (id int, candidateId int)\"], \"database\": true, \"name\": \"winning_candidate\", \"pythondata\": [\"Candidate = pd.DataFrame([], columns=['id', 'name']).astype({'id':'Int64', 'name':'object'})\", \"Vote = pd.DataFrame([], columns=['id', 'candidateId']).astype({'id':'Int64', 'candidateId':'Int64'})\"], \"postgresql\": [\"\\nCreate table If Not Exists Candidate (id int, name varchar(255))\\n\", \"Create table If Not Exists Vote (id int, candidateId int)\"], \"database_schema\": {\"Candidate\": {\"id\": \"INT\", \"name\": \"VARCHAR(255)\"}, \"Vote\": {\"id\": \"INT\", \"candidateId\": \"INT\"}}}" ,
2022-03-27 18:35:17 +08:00
"judgerAvailable" : true ,
"judgeType" : "large" ,
"mysqlSchemas" : [
"Create table If Not Exists Candidate (id int, name varchar(255))" ,
"Create table If Not Exists Vote (id int, candidateId int)" ,
"Truncate table Candidate" ,
"insert into Candidate (id, name) values ('1', 'A')" ,
"insert into Candidate (id, name) values ('2', 'B')" ,
"insert into Candidate (id, name) values ('3', 'C')" ,
"insert into Candidate (id, name) values ('4', 'D')" ,
"insert into Candidate (id, name) values ('5', 'E')" ,
"Truncate table Vote" ,
"insert into Vote (id, candidateId) values ('1', '2')" ,
"insert into Vote (id, candidateId) values ('2', '4')" ,
"insert into Vote (id, candidateId) values ('3', '3')" ,
"insert into Vote (id, candidateId) values ('4', '2')" ,
"insert into Vote (id, candidateId) values ('5', '5')"
] ,
"enableRunCode" : true ,
"enableTestMode" : false ,
"enableDebugger" : false ,
2023-12-09 18:42:21 +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:35:17 +08:00
"libraryUrl" : null ,
"adminUrl" : null ,
"challengeQuestion" : null ,
"__typename" : "QuestionNode"
}
}
}