mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 14:12:17 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>表: <code>Person</code></p>\n\n<pre>\n+-------------+---------+\n| 列名 | 类型 |\n+-------------+---------+\n| PersonId | int |\n| FirstName | varchar |\n| LastName | varchar |\n+-------------+---------+\npersonId是该表的主键列。\n该表包含一些人的ID和他们的姓和名的信息。\n</pre>\n\n<p> </p>\n\n<p>表: <code>Address</code></p>\n\n<pre>\n+-------------+---------+\n| 列名 | 类型 |\n+-------------+---------+\n| AddressId | int |\n| PersonId | int |\n| City | varchar |\n| State | varchar |\n+-------------+---------+\naddressId是该表的主键列。\n该表的每一行都包含一个ID = PersonId的人的城市和州的信息。\n</pre>\n\n<p> </p>\n\n<p>编写一个SQL查询来报告 <code>Person</code> 表中每个人的姓、名、城市和状态。如果 <code>personId</code> 的地址不在 <code>Address</code> 表中,则报告为空 <code>null</code> 。</p>\n\n<p>以 <strong>任意顺序</strong> 返回结果表。</p>\n\n<p>查询结果格式如下所示。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> \nPerson表:\n+----------+----------+-----------+\n| personId | lastName | firstName |\n+----------+----------+-----------+\n| 1 | Wang | Allen |\n| 2 | Alice | Bob |\n+----------+----------+-----------+\nAddress表:\n+-----------+----------+---------------+------------+\n| addressId | personId | city | state |\n+-----------+----------+---------------+------------+\n| 1 | 2 | New York City | New York |\n| 2 | 3 | Leetcode | California |\n+-----------+----------+---------------+------------+\n<strong>输出:</strong> \n+-----------+----------+---------------+----------+\n| firstName | lastName | city | state |\n+-----------+----------+---------------+----------+\n| Allen | Wang | Null | Null |\n| Bob | Alice | New York City | New York |\n+-----------+----------+---------------+----------+\n<strong>解释:</strong> \n地址表中没有 personId = 1 的地址,所以它们的城市和州返回null。\naddressId = 1 包含了 personId = 2 的地址信息。</pre>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 1078,
|
||||
"likes": 1102,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[{\"title\": \"Employee Bonus\", \"titleSlug\": \"employee-bonus\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u5458\\u5de5\\u5956\\u91d1\"}]",
|
||||
@@ -47,7 +47,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"362.9K\", \"totalSubmission\": \"494.5K\", \"totalAcceptedRaw\": 362888, \"totalSubmissionRaw\": 494529, \"acRate\": \"73.4%\"}",
|
||||
"stats": "{\"totalAccepted\": \"373.9K\", \"totalSubmission\": \"508.6K\", \"totalAcceptedRaw\": 373851, \"totalSubmissionRaw\": 508550, \"acRate\": \"73.5%\"}",
|
||||
"hints": [],
|
||||
"solution": {
|
||||
"id": "101",
|
||||
@@ -55,7 +55,7 @@
|
||||
"__typename": "ArticleNode"
|
||||
},
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\":{\"Person\":[\"personId\",\"lastName\",\"firstName\"],\"Address\":[\"addressId\",\"personId\",\"city\",\"state\"]},\"rows\":{\"Person\":[[1,\"Wang\",\"Allen\"],[2,\"Alice\",\"Bob\"]],\"Address\":[[1,2,\"New York City\",\"New York\"],[2,3,\"Leetcode\",\"California\"]]}}",
|
||||
"sampleTestCase": "{\"headers\":{\"Person\":[\"PersonId\",\"LastName\",\"FirstName\"],\"Address\":[\"AddressId\",\"PersonId\",\"City\",\"State\"]},\"rows\":{\"Person\":[[1,\"Wang\",\"Allen\"],[2,\"Alice\",\"Bob\"]],\"Address\":[[1,2,\"New York City\",\"New York\"],[2,3,\"Leetcode\",\"California\"]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists Person (personId int, firstName varchar(255), lastName varchar(255))\",\n \"Create table If Not Exists Address (addressId int, personId int, city varchar(255), state varchar(255))\"\n ],\n \"mssql\": [\n \"Create table Person (personId int, firstName varchar(255), lastName varchar(255))\",\n \"Create table Address (addressId int, personId int, city varchar(255), state varchar(255))\"\n ],\n \"oraclesql\": [\n \"Create table Person (personId int, firstName varchar(255), lastName varchar(255))\",\n \"Create table Address (addressId int, personId int, city varchar(255), state varchar(255))\"\n ],\n \"database\": true\n}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
|
Reference in New Issue
Block a user