{ "data": { "question": { "questionId": "1718", "questionFrontendId": "1571", "boundTopicId": null, "title": "Warehouse Manager", "titleSlug": "warehouse-manager", "content": null, "translatedTitle": null, "translatedContent": null, "isPaidOnly": true, "difficulty": "Easy", "likes": 153, "dislikes": 10, "isLiked": null, "similarQuestions": "[]", "exampleTestcases": "{\"headers\": {\"Warehouse\": [\"name\", \"product_id\", \"units\"], \"Products\": [\"product_id\", \"product_name\", \"Width\", \"Length\", \"Height\"]}, \"rows\": {\"Warehouse\": [[\"LCHouse1\", 1, 1], [\"LCHouse1\", 2, 10], [\"LCHouse1\", 3, 5], [\"LCHouse2\", 1, 2], [\"LCHouse2\", 2, 2], [\"LCHouse3\", 4, 1]], \"Products\": [[1, \"LC-TV\", 5, 50, 40], [2, \"LC-KeyChain\", 5, 5, 5], [3, \"LC-Phone\", 2, 10, 10], [4, \"LC-T-Shirt\", 4, 10, 20]]}}", "categoryTitle": "Database", "contributors": [], "topicTags": [ { "name": "Database", "slug": "database", "translatedName": null, "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"38.4K\", \"totalSubmission\": \"43.8K\", \"totalAcceptedRaw\": 38442, \"totalSubmissionRaw\": 43785, \"acRate\": \"87.8%\"}", "hints": [], "solution": { "id": "2028", "canSeeDetail": false, "paidOnly": true, "hasVideoSolution": false, "paidOnlyVideo": true, "__typename": "ArticleNode" }, "status": null, "sampleTestCase": "{\"headers\": {\"Warehouse\": [\"name\", \"product_id\", \"units\"], \"Products\": [\"product_id\", \"product_name\", \"Width\", \"Length\", \"Height\"]}, \"rows\": {\"Warehouse\": [[\"LCHouse1\", 1, 1], [\"LCHouse1\", 2, 10], [\"LCHouse1\", 3, 5], [\"LCHouse2\", 1, 2], [\"LCHouse2\", 2, 2], [\"LCHouse3\", 4, 1]], \"Products\": [[1, \"LC-TV\", 5, 50, 40], [2, \"LC-KeyChain\", 5, 5, 5], [3, \"LC-Phone\", 2, 10, 10], [4, \"LC-T-Shirt\", 4, 10, 20]]}}", "metaData": "{\"mysql\": [\"Create table If Not Exists Warehouse (name varchar(50), product_id int, units int)\\n\", \"Create table If Not Exists Products (product_id int, product_name varchar(50), Width int,Length int,Height int)\"], \"mssql\": [\"Create table Warehouse (name varchar(50), product_id int, units int)\\n\", \"Create table Products (product_id int, product_name varchar(50), Width int,Length int,Height int)\\n\"], \"oraclesql\": [\"Create table Warehouse (name varchar(50), product_id int, units int)\\n\", \"Create table Products (product_id int, product_name varchar(50), Width int,Length int,Height int)\\n\"], \"database\": true, \"name\": \"warehouse_manager\", \"pythondata\": [\"Warehouse = pd.DataFrame([], columns=['name', 'product_id', 'units']).astype({'name':'object', 'product_id':'Int64', 'units':'Int64'})\", \"Products = pd.DataFrame([], columns=['product_id', 'product_name', 'Width', 'Length', 'Height']).astype({'product_id':'Int64', 'product_name':'object', 'Width':'Int64', 'Length':'Int64', 'Height':'Int64'})\"], \"postgresql\": [\"\\nCreate table If Not Exists Warehouse (name varchar(50), product_id int, units int)\\n\", \"Create table If Not Exists Products (product_id int, product_name varchar(50), Width int,Length int,Height int)\"], \"database_schema\": {\"Warehouse\": {\"name\": \"VARCHAR(50)\", \"product_id\": \"INT\", \"units\": \"INT\"}, \"Products\": {\"product_id\": \"INT\", \"product_name\": \"VARCHAR(50)\", \"Width\": \"INT\", \"Length\": \"INT\", \"Height\": \"INT\"}}}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Warehouse (name varchar(50), product_id int, units int)\n", "Create table If Not Exists Products (product_id int, product_name varchar(50), Width int,Length int,Height int)", "Truncate table Warehouse", "insert into Warehouse (name, product_id, units) values ('LCHouse1', '1', '1')", "insert into Warehouse (name, product_id, units) values ('LCHouse1', '2', '10')", "insert into Warehouse (name, product_id, units) values ('LCHouse1', '3', '5')", "insert into Warehouse (name, product_id, units) values ('LCHouse2', '1', '2')", "insert into Warehouse (name, product_id, units) values ('LCHouse2', '2', '2')", "insert into Warehouse (name, product_id, units) values ('LCHouse3', '4', '1')", "Truncate table Products", "insert into Products (product_id, product_name, Width, Length, Height) values ('1', 'LC-TV', '5', '50', '40')", "insert into Products (product_id, product_name, Width, Length, Height) values ('2', 'LC-KeyChain', '5', '5', '5')", "insert into Products (product_id, product_name, Width, Length, Height) values ('3', 'LC-Phone', '2', '10', '10')", "insert into Products (product_id, product_name, Width, Length, Height) values ('4', 'LC-T-Shirt', '4', '10', '20')" ], "enableRunCode": true, "enableTestMode": false, "enableDebugger": false, "envInfo": "{\"mysql\": [\"MySQL\", \"
MySQL 8.0
.
mssql server 2019
.
Oracle Sql 11.2
.
Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0
\"], \"postgresql\": [\"PostgreSQL\", \"PostgreSQL 16
\"]}", "libraryUrl": null, "adminUrl": null, "challengeQuestion": null, "__typename": "QuestionNode" } } }