{ "data": { "question": { "questionId": "1641", "questionFrontendId": "1501", "boundTopicId": null, "title": "Countries You Can Safely Invest In", "titleSlug": "countries-you-can-safely-invest-in", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 151, "dislikes": 19, "isLiked": null, "similarQuestions": "[{\"title\": \"Average Salary: Departments VS Company\", \"titleSlug\": \"average-salary-departments-vs-company\", \"difficulty\": \"Hard\", \"translatedTitle\": null}]", "exampleTestcases": "{\"headers\":{\"Person\":[\"id\",\"name\",\"phone_number\"],\"Country\":[\"name\",\"country_code\"],\"Calls\":[\"caller_id\",\"callee_id\",\"duration\"]},\"rows\":{\"Person\":[[3,\"Jonathan\",\"051-1234567\"],[12,\"Elvis\",\"051-7654321\"],[1,\"Moncef\",\"212-1234567\"],[2,\"Maroua\",\"212-6523651\"],[7,\"Meir\",\"972-1234567\"],[9,\"Rachel\",\"972-0011100\"]],\"Country\":[[\"Peru\",\"051\"],[\"Israel\",\"972\"],[\"Morocco\",\"212\"],[\"Germany\",\"049\"],[\"Ethiopia\",\"251\"]],\"Calls\":[[1,9,33],[2,9,4],[1,2,59],[3,12,102],[3,12,330],[12,3,5],[7,9,13],[7,1,3],[9,7,1],[1,7,7]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"15.4K\", \"totalSubmission\": \"26.6K\", \"totalAcceptedRaw\": 15419, \"totalSubmissionRaw\": 26567, \"acRate\": \"58.0%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Person\":[\"id\",\"name\",\"phone_number\"],\"Country\":[\"name\",\"country_code\"],\"Calls\":[\"caller_id\",\"callee_id\",\"duration\"]},\"rows\":{\"Person\":[[3,\"Jonathan\",\"051-1234567\"],[12,\"Elvis\",\"051-7654321\"],[1,\"Moncef\",\"212-1234567\"],[2,\"Maroua\",\"212-6523651\"],[7,\"Meir\",\"972-1234567\"],[9,\"Rachel\",\"972-0011100\"]],\"Country\":[[\"Peru\",\"051\"],[\"Israel\",\"972\"],[\"Morocco\",\"212\"],[\"Germany\",\"049\"],[\"Ethiopia\",\"251\"]],\"Calls\":[[1,9,33],[2,9,4],[1,2,59],[3,12,102],[3,12,330],[12,3,5],[7,9,13],[7,1,3],[9,7,1],[1,7,7]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Person (id int, name varchar(15), phone_number varchar(11))\",\n \"Create table If Not Exists Country (name varchar(15), country_code varchar(3))\",\n \"Create table If Not Exists Calls (caller_id int, callee_id int, duration int)\"\n ],\n \"mssql\": [\n \"Create table Person (id int, name varchar(15), phone_number varchar(11))\",\n \"Create table Country (name varchar(15), country_code varchar(3))\",\n \"Create table Calls (caller_id int, callee_id int, duration int)\"\n ],\n \"oraclesql\": [\n \"Create table Person (id int, name varchar(15), phone_number varchar(11))\",\n \"Create table Country (name varchar(15), country_code varchar(3))\",\n \"Create table Calls (caller_id int, callee_id int, duration int)\"\n ],\n \"database\": true\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Person (id int, name varchar(15), phone_number varchar(11))", "Create table If Not Exists Country (name varchar(15), country_code varchar(3))", "Create table If Not Exists Calls (caller_id int, callee_id int, duration int)", "Truncate table Person", "insert into Person (id, name, phone_number) values ('3', 'Jonathan', '051-1234567')", "insert into Person (id, name, phone_number) values ('12', 'Elvis', '051-7654321')", "insert into Person (id, name, phone_number) values ('1', 'Moncef', '212-1234567')", "insert into Person (id, name, phone_number) values ('2', 'Maroua', '212-6523651')", "insert into Person (id, name, phone_number) values ('7', 'Meir', '972-1234567')", "insert into Person (id, name, phone_number) values ('9', 'Rachel', '972-0011100')", "Truncate table Country", "insert into Country (name, country_code) values ('Peru', '051')", "insert into Country (name, country_code) values ('Israel', '972')", "insert into Country (name, country_code) values ('Morocco', '212')", "insert into Country (name, country_code) values ('Germany', '049')", "insert into Country (name, country_code) values ('Ethiopia', '251')", "Truncate table Calls", "insert into Calls (caller_id, callee_id, duration) values ('1', '9', '33')", "insert into Calls (caller_id, callee_id, duration) values ('2', '9', '4')", "insert into Calls (caller_id, callee_id, duration) values ('1', '2', '59')", "insert into Calls (caller_id, callee_id, duration) values ('3', '12', '102')", "insert into Calls (caller_id, callee_id, duration) values ('3', '12', '330')", "insert into Calls (caller_id, callee_id, duration) values ('12', '3', '5')", "insert into Calls (caller_id, callee_id, duration) values ('7', '9', '13')", "insert into Calls (caller_id, callee_id, duration) values ('7', '1', '3')", "insert into Calls (caller_id, callee_id, duration) values ('9', '7', '1')", "insert into Calls (caller_id, callee_id, duration) values ('1', '7', '7')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"
MySQL 8.0
.
mssql server 2019
.
Oracle Sql 11.2
.