{ "data": { "question": { "questionId": "1536", "questionFrontendId": "1398", "categoryTitle": "Database", "boundTopicId": 184968, "title": "Customers Who Bought Products A and B but Not C", "titleSlug": "customers-who-bought-products-a-and-b-but-not-c", "content": null, "translatedTitle": "购买了产品 A 和产品 B 却没有购买产品 C 的顾客", "translatedContent": null, "isPaidOnly": true, "difficulty": "Medium", "likes": 18, "dislikes": 0, "isLiked": null, "similarQuestions": "[]", "contributors": [], "langToValidPlayground": null, "topicTags": [ { "name": "Database", "slug": "database", "translatedName": "数据库", "__typename": "TopicTagNode" } ], "companyTagStats": null, "codeSnippets": null, "stats": "{\"totalAccepted\": \"5.9K\", \"totalSubmission\": \"7.9K\", \"totalAcceptedRaw\": 5920, \"totalSubmissionRaw\": 7893, \"acRate\": \"75.0%\"}", "hints": [], "solution": null, "status": null, "sampleTestCase": "{\"headers\":{\"Customers\":[\"customer_id\",\"customer_name\"],\"Orders\":[\"order_id\",\"customer_id\",\"product_name\"]},\"rows\":{\"Customers\":[[1,\"Daniel\"],[2,\"Diana\"],[3,\"Elizabeth\"],[4,\"Jhon\"]],\"Orders\":[[10,1,\"A\"],[20,1,\"B\"],[30,1,\"D\"],[40,1,\"C\"],[50,2,\"A\"],[60,3,\"A\"],[70,3,\"B\"],[80,3,\"D\"],[90,4,\"C\"]]}}", "metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Customers (customer_id int, customer_name varchar(30))\",\n \"Create table If Not Exists Orders (order_id int, customer_id int, product_name varchar(30))\"\n ],\n \"mssql\": [\n \"Create table Customers (customer_id int, customer_name varchar(30))\",\n \"Create table Orders (order_id int, customer_id int, product_name varchar(30))\"\n ],\n \"oraclesql\": [\n \"Create table Customers (customer_id int, customer_name varchar(30))\",\n \"Create table Orders (order_id int, customer_id int, product_name varchar(30))\"\n ],\n \"database\": true\n}", "judgerAvailable": true, "judgeType": "large", "mysqlSchemas": [ "Create table If Not Exists Customers (customer_id int, customer_name varchar(30))", "Create table If Not Exists Orders (order_id int, customer_id int, product_name varchar(30))", "Truncate table Customers", "insert into Customers (customer_id, customer_name) values ('1', 'Daniel')", "insert into Customers (customer_id, customer_name) values ('2', 'Diana')", "insert into Customers (customer_id, customer_name) values ('3', 'Elizabeth')", "insert into Customers (customer_id, customer_name) values ('4', 'Jhon')", "Truncate table Orders", "insert into Orders (order_id, customer_id, product_name) values ('10', '1', 'A')", "insert into Orders (order_id, customer_id, product_name) values ('20', '1', 'B')", "insert into Orders (order_id, customer_id, product_name) values ('30', '1', 'D')", "insert into Orders (order_id, customer_id, product_name) values ('40', '1', 'C')", "insert into Orders (order_id, customer_id, product_name) values ('50', '2', 'A')", "insert into Orders (order_id, customer_id, product_name) values ('60', '3', 'A')", "insert into Orders (order_id, customer_id, product_name) values ('70', '3', 'B')", "insert into Orders (order_id, customer_id, product_name) values ('80', '3', 'D')", "insert into Orders (order_id, customer_id, product_name) values ('90', '4', 'C')" ], "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\":{\"Customers\":[\"customer_id\",\"customer_name\"],\"Orders\":[\"order_id\",\"customer_id\",\"product_name\"]},\"rows\":{\"Customers\":[[1,\"Daniel\"],[2,\"Diana\"],[3,\"Elizabeth\"],[4,\"Jhon\"]],\"Orders\":[[10,1,\"A\"],[20,1,\"B\"],[30,1,\"D\"],[40,1,\"C\"],[50,2,\"A\"],[60,3,\"A\"],[70,3,\"B\"],[80,3,\"D\"],[90,4,\"C\"]]}}",
"__typename": "QuestionNode"
}
}
}MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"