{"id":2086,"date":"2023-10-01T20:20:20","date_gmt":"2023-10-01T12:20:20","guid":{"rendered":"https:\/\/white-night.club\/?p=2086"},"modified":"2023-11-09T11:07:51","modified_gmt":"2023-11-09T03:07:51","slug":"ad21","status":"publish","type":"post","link":"https:\/\/white-night.club\/index.php\/2023\/10\/01\/ad21\/","title":{"rendered":"1527.\u00a0\u60a3\u67d0\u79cd\u75be\u75c5\u7684\u60a3\u8005"},"content":{"rendered":"\n<p>\u60a3\u8005\u4fe1\u606f\u8868\uff1a&nbsp;<code>Patients<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+--------------+---------+\n| Column Name  | Type    |\n+--------------+---------+\n| patient_id   | int     |\n| patient_name | varchar |\n| conditions   | varchar |\n+--------------+---------+\n\u5728 SQL \u4e2d\uff0cpatient_id \uff08\u60a3\u8005 ID\uff09\u662f\u8be5\u8868\u7684\u4e3b\u952e\u3002\n'conditions' \uff08\u75be\u75c5\uff09\u5305\u542b 0 \u4e2a\u6216\u4ee5\u4e0a\u7684\u75be\u75c5\u4ee3\u7801\uff0c\u4ee5\u7a7a\u683c\u5206\u9694\u3002\n\u8fd9\u4e2a\u8868\u5305\u542b\u533b\u9662\u4e2d\u60a3\u8005\u7684\u4fe1\u606f\u3002<\/pre>\n\n\n\n<p>\u67e5\u8be2\u60a3\u6709 I \u7c7b\u7cd6\u5c3f\u75c5\u7684\u60a3\u8005&nbsp;ID \uff08patient_id\uff09\u3001\u60a3\u8005\u59d3\u540d\uff08patient_name\uff09\u4ee5\u53ca\u5176\u60a3\u6709\u7684\u6240\u6709\u75be\u75c5\u4ee3\u7801\uff08conditions\uff09\u3002I \u7c7b\u7cd6\u5c3f\u75c5\u7684\u4ee3\u7801\u603b\u662f\u5305\u542b\u524d\u7f00&nbsp;<code>DIAB1<\/code>&nbsp;\u3002<\/p>\n\n\n\n<p>\u6309&nbsp;<strong>\u4efb\u610f\u987a\u5e8f<\/strong>&nbsp;\u8fd4\u56de\u7ed3\u679c\u8868\u3002<\/p>\n\n\n\n<p>\u67e5\u8be2\u7ed3\u679c\u683c\u5f0f\u5982\u4e0b\u793a\u4f8b\u6240\u793a\u3002<\/p>\n\n\n\n<p><strong>\u793a\u4f8b 1:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><strong>\u8f93\u5165\uff1a\n<\/strong>Patients\u8868\uff1a<\/code>\n+------------+--------------+--------------+\n| patient_id | patient_name | conditions   |\n+------------+--------------+--------------+\n| 1          | Daniel      &nbsp;| YFEV COUGH   |\n| 2    &nbsp;     | Alice        |            &nbsp; |\n| 3    &nbsp;     | Bob         &nbsp;| DIAB100 MYOP&nbsp;|\n| 4 &nbsp;        | George      &nbsp;| ACNE DIAB100&nbsp;|\n| 5 &nbsp;        | Alain       &nbsp;| DIAB201     &nbsp;|\n+------------+--------------+--------------+\n<strong>\u8f93\u51fa\uff1a<\/strong>\n+------------+--------------+--------------+\n| patient_id | patient_name | conditions   |\n+------------+--------------+--------------+\n| 3    &nbsp;     | Bob         &nbsp;| DIAB100 MYOP&nbsp;|\n| 4 &nbsp;        | George   &nbsp;   | ACNE DIAB100&nbsp;| \n+------------+--------------+--------------+\n<strong>\u89e3\u91ca\uff1a<\/strong>Bob \u548c George \u90fd\u60a3\u6709\u4ee3\u7801\u4ee5 DIAB1 \u5f00\u5934\u7684\u75be\u75c5\u3002<\/pre>\n\n\n\n<div style=\"height:60px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<blockquote class=\"wp-block-quote has-luminous-vivid-amber-color has-text-color\">\n<p>\u89e3\u9898\u601d\u8def<\/p>\n<cite><em>\u6b63\u5219\u8868\u8fbe\u5f0f<\/em><\/cite><\/blockquote>\n\n\n\n<p>\u56fd\u5e86\u5047\u671f\u4e0d\u662f\u5f88\u60f3\u505a\u9898\u554a&#8230;\u65e9\u4e0a\u5199\u7684\u52a8\u6001\u89c4\u5212\u9898\u5b9e\u5728\u6ca1\u5fc3\u601d\u505a\uff0c\u8fd8\u662f\u6765\u9053\u7b80\u5355\u7684SQL\u9898\u8c03\u8282\u8c03\u8282\u5fc3\u60c5\u5427\u3002<\/p>\n\n\n\n<p>DIAB1\u5f00\u5934\u7684\u8bdd\uff0c\u4ece\u9898\u76ee\u6765\u770b\u6709\u4e24\u79cd\u60c5\u51b5<\/p>\n\n\n\n<ul>\n<li>DIAB1xxx xxxxx<\/li>\n\n\n\n<li>xxxx DIAB1xxxx<\/li>\n<\/ul>\n\n\n\n<p>\u4e5f\u4e0d\u96be\u7406\u89e3\u3002\u90a3\u53ea\u6709\u770b\u4e00\u4e2a\u524d\u9762\u4e0d\u5e26\u7a7a\u683c\uff0c\u4e00\u4e2a\u5e26\u7a7a\u683c\uff0c\u5176\u4ed6\u5168\u90e8\u65e0\u89c6\u5c31\u597d\u4e86\u3002\u4e0a\u5348\u5728\u770b\u5176\u4ed6\u9898\u7684\u9898\u89e3\u7684\u65f6\u5019\u770b\u5230\u4e86\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u7528\u6cd5\u3002\u81ea\u5df1\u767e\u5ea6\u5b66\u4e86\u4e0b\uff0c\u561b\uff0c\u5927\u81f4\u7528\u6cd5\u5982\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Write your MySQL query statement below\nSELECT * FROM Patients\nWHERE conditions REGEXP ' DIAB1|^DIAB1'<\/code><\/pre>\n\n\n\n<p>\u8c8c\u4f3c\u8fd8\u80fd\u66f4\u7b80\u6d01\uff0c\u4e0d\u8fc7\u8fd9\u4e2a\u80fd\u770b\u61c2\u5c31\u884c\u4e86\u3002^\u8868\u793a\u5f00\u5934\u662f\u5426\u5305\u542bxxx\u3002\u4e0d\u8fc7\u6b63\u5219\u8868\u8fbe\u5f0f\u80fd\u7528\u6216\u5c31\u5f88\u4e0d\u9519\uff0c\u7701\u7684\u5199condition &#8230; OR condition &#8230;.\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Leetcode\u9898\u76ee\uff1a\u6b63\u5219\u8868\u8fbe\u5f0f<\/p>\n","protected":false},"author":1,"featured_media":2827,"comment_status":"open","ping_status":"","sticky":false,"template":"base","format":"standard","meta":{"footnotes":""},"categories":[42,25],"tags":[38],"_links":{"self":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/2086"}],"collection":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/comments?post=2086"}],"version-history":[{"count":0,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/2086\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media\/2827"}],"wp:attachment":[{"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/media?parent=2086"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/categories?post=2086"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/tags?post=2086"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}