mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-10 01:41:41 +08:00
批量更新数据
This commit is contained in:
@@ -1,70 +1,70 @@
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "2515",
|
||||
"questionFrontendId": "2372",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 1746115,
|
||||
"title": "Calculate the Influence of Each Salesperson",
|
||||
"titleSlug": "calculate-the-influence-of-each-salesperson",
|
||||
"content": null,
|
||||
"translatedTitle": "计算每个销售人员的影响力",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"1K\", \"totalSubmission\": \"1.3K\", \"totalAcceptedRaw\": 1032, \"totalSubmissionRaw\": 1340, \"acRate\": \"77.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Salesperson\":[\"salesperson_id\",\"name\"],\"Customer\":[\"customer_id\",\"salesperson_id\"],\"Sales\":[\"sale_id\",\"customer_id\",\"price\"]},\"rows\":{\"Salesperson\":[[1,\"Alice\"],[2,\"Bob\"],[3,\"Jerry\"]],\"Customer\":[[1,1],[2,1],[3,2]],\"Sales\":[[1,2,892],[2,1,354],[3,3,988],[4,3,856]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table If Not Exists Salesperson (salesperson_id int, name varchar(30))\",\"Create table If Not Exists Customer (customer_id int, salesperson_id int)\",\"Create table If Not Exists Sales (sale_id int, customer_id int, price int)\"],\"mssql\":[\"Create table Salesperson (salesperson_id int, name varchar(30))\",\"Create table Customer (customer_id int, salesperson_id int)\",\"Create table Sales (sale_id int, customer_id int, price int)\"],\"oraclesql\":[\"Create table Salesperson (salesperson_id int, name varchar(30))\",\"Create table Customer (customer_id int, salesperson_id int)\",\"Create table Sales (sale_id int, customer_id int, price int)\"],\"database\":true,\"name\":\"calculate_influence\",\"pythondata\":[\"Salesperson = pd.DataFrame([], columns=['salesperson_id', 'name']).astype({'salesperson_id':'Int64', 'name':'object'})\",\"Customer = pd.DataFrame([], columns=['customer_id', 'salesperson_id']).astype({'customer_id':'Int64', 'salesperson_id':'Int64'})\",\"Sales = pd.DataFrame([], columns=['sale_id', 'customer_id', 'price']).astype({'sale_id':'Int64', 'customer_id':'Int64', 'price':'Int64'})\"],\"postgresql\":[\"Create table If Not Exists Salesperson (salesperson_id int, name varchar(30))\",\"Create table If Not Exists Customer (customer_id int, salesperson_id int)\",\"Create table If Not Exists Sales (sale_id int, customer_id int, price int)\"],\"database_schema\":{\"Salesperson\":{\"salesperson_id\":\"INT\",\"name\":\"VARCHAR(30)\"},\"Customer\":{\"customer_id\":\"INT\",\"salesperson_id\":\"INT\"},\"Sales\":{\"sale_id\":\"INT\",\"customer_id\":\"INT\",\"price\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Salesperson (salesperson_id int, name varchar(30))",
|
||||
"Create table If Not Exists Customer (customer_id int, salesperson_id int)",
|
||||
"Create table If Not Exists Sales (sale_id int, customer_id int, price int)",
|
||||
"Truncate table Salesperson",
|
||||
"insert into Salesperson (salesperson_id, name) values ('1', 'Alice')",
|
||||
"insert into Salesperson (salesperson_id, name) values ('2', 'Bob')",
|
||||
"insert into Salesperson (salesperson_id, name) values ('3', 'Jerry')",
|
||||
"Truncate table Customer",
|
||||
"insert into Customer (customer_id, salesperson_id) values ('1', '1')",
|
||||
"insert into Customer (customer_id, salesperson_id) values ('2', '1')",
|
||||
"insert into Customer (customer_id, salesperson_id) values ('3', '2')",
|
||||
"Truncate table Sales",
|
||||
"insert into Sales (sale_id, customer_id, price) values ('1', '2', '892')",
|
||||
"insert into Sales (sale_id, customer_id, price) values ('2', '1', '354')",
|
||||
"insert into Sales (sale_id, customer_id, price) values ('3', '3', '988')",
|
||||
"insert into Sales (sale_id, customer_id, price) values ('4', '3', '856')"
|
||||
],
|
||||
"enableRunCode": true,
|
||||
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"Salesperson\":[\"salesperson_id\",\"name\"],\"Customer\":[\"customer_id\",\"salesperson_id\"],\"Sales\":[\"sale_id\",\"customer_id\",\"price\"]},\"rows\":{\"Salesperson\":[[1,\"Alice\"],[2,\"Bob\"],[3,\"Jerry\"]],\"Customer\":[[1,1],[2,1],[3,2]],\"Sales\":[[1,2,892],[2,1,354],[3,3,988],[4,3,856]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
{
|
||||
"data": {
|
||||
"question": {
|
||||
"questionId": "2515",
|
||||
"questionFrontendId": "2372",
|
||||
"categoryTitle": "Database",
|
||||
"boundTopicId": 1746115,
|
||||
"title": "Calculate the Influence of Each Salesperson",
|
||||
"titleSlug": "calculate-the-influence-of-each-salesperson",
|
||||
"content": null,
|
||||
"translatedTitle": "计算每个销售人员的影响力",
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": true,
|
||||
"difficulty": "Medium",
|
||||
"likes": 0,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": null,
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
"slug": "database",
|
||||
"translatedName": "数据库",
|
||||
"__typename": "TopicTagNode"
|
||||
}
|
||||
],
|
||||
"companyTagStats": null,
|
||||
"codeSnippets": null,
|
||||
"stats": "{\"totalAccepted\": \"1.7K\", \"totalSubmission\": \"2.1K\", \"totalAcceptedRaw\": 1665, \"totalSubmissionRaw\": 2132, \"acRate\": \"78.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Salesperson\":[\"salesperson_id\",\"name\"],\"Customer\":[\"customer_id\",\"salesperson_id\"],\"Sales\":[\"sale_id\",\"customer_id\",\"price\"]},\"rows\":{\"Salesperson\":[[1,\"Alice\"],[2,\"Bob\"],[3,\"Jerry\"]],\"Customer\":[[1,1],[2,1],[3,2]],\"Sales\":[[1,2,892],[2,1,354],[3,3,988],[4,3,856]]}}",
|
||||
"metaData": "{\"mysql\":[\"Create table If Not Exists Salesperson (salesperson_id int, name varchar(30))\",\"Create table If Not Exists Customer (customer_id int, salesperson_id int)\",\"Create table If Not Exists Sales (sale_id int, customer_id int, price int)\"],\"mssql\":[\"Create table Salesperson (salesperson_id int, name varchar(30))\",\"Create table Customer (customer_id int, salesperson_id int)\",\"Create table Sales (sale_id int, customer_id int, price int)\"],\"oraclesql\":[\"Create table Salesperson (salesperson_id int, name varchar(30))\",\"Create table Customer (customer_id int, salesperson_id int)\",\"Create table Sales (sale_id int, customer_id int, price int)\"],\"database\":true,\"name\":\"calculate_influence\",\"pythondata\":[\"Salesperson = pd.DataFrame([], columns=['salesperson_id', 'name']).astype({'salesperson_id':'Int64', 'name':'object'})\",\"Customer = pd.DataFrame([], columns=['customer_id', 'salesperson_id']).astype({'customer_id':'Int64', 'salesperson_id':'Int64'})\",\"Sales = pd.DataFrame([], columns=['sale_id', 'customer_id', 'price']).astype({'sale_id':'Int64', 'customer_id':'Int64', 'price':'Int64'})\"],\"postgresql\":[\"Create table If Not Exists Salesperson (salesperson_id int, name varchar(30))\",\"Create table If Not Exists Customer (customer_id int, salesperson_id int)\",\"Create table If Not Exists Sales (sale_id int, customer_id int, price int)\"],\"database_schema\":{\"Salesperson\":{\"salesperson_id\":\"INT\",\"name\":\"VARCHAR(30)\"},\"Customer\":{\"customer_id\":\"INT\",\"salesperson_id\":\"INT\"},\"Sales\":{\"sale_id\":\"INT\",\"customer_id\":\"INT\",\"price\":\"INT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists Salesperson (salesperson_id int, name varchar(30))",
|
||||
"Create table If Not Exists Customer (customer_id int, salesperson_id int)",
|
||||
"Create table If Not Exists Sales (sale_id int, customer_id int, price int)",
|
||||
"Truncate table Salesperson",
|
||||
"insert into Salesperson (salesperson_id, name) values ('1', 'Alice')",
|
||||
"insert into Salesperson (salesperson_id, name) values ('2', 'Bob')",
|
||||
"insert into Salesperson (salesperson_id, name) values ('3', 'Jerry')",
|
||||
"Truncate table Customer",
|
||||
"insert into Customer (customer_id, salesperson_id) values ('1', '1')",
|
||||
"insert into Customer (customer_id, salesperson_id) values ('2', '1')",
|
||||
"insert into Customer (customer_id, salesperson_id) values ('3', '2')",
|
||||
"Truncate table Sales",
|
||||
"insert into Sales (sale_id, customer_id, price) values ('1', '2', '892')",
|
||||
"insert into Sales (sale_id, customer_id, price) values ('2', '1', '354')",
|
||||
"insert into Sales (sale_id, customer_id, price) values ('3', '3', '988')",
|
||||
"insert into Sales (sale_id, customer_id, price) values ('4', '3', '856')"
|
||||
],
|
||||
"enableRunCode": true,
|
||||
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
"dailyRecordStatus": null,
|
||||
"editorType": "CKEDITOR",
|
||||
"ugcQuestionId": null,
|
||||
"style": "LEETCODE",
|
||||
"exampleTestcases": "{\"headers\":{\"Salesperson\":[\"salesperson_id\",\"name\"],\"Customer\":[\"customer_id\",\"salesperson_id\"],\"Sales\":[\"sale_id\",\"customer_id\",\"price\"]},\"rows\":{\"Salesperson\":[[1,\"Alice\"],[2,\"Bob\"],[3,\"Jerry\"]],\"Customer\":[[1,1],[2,1],[3,2]],\"Sales\":[[1,2,892],[2,1,354],[3,3,988],[4,3,856]]}}",
|
||||
"__typename": "QuestionNode"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user