{"id":4124,"date":"2023-11-05T11:43:14","date_gmt":"2023-11-05T03:43:14","guid":{"rendered":"https:\/\/white-night.club\/?p=4124"},"modified":"2023-11-09T11:07:43","modified_gmt":"2023-11-09T03:07:43","slug":"ad129","status":"publish","type":"post","link":"https:\/\/white-night.club\/index.php\/2023\/11\/05\/ad129\/","title":{"rendered":"2669.\u00a0\u7edf\u8ba1 Spotify \u6392\u884c\u699c\u4e0a\u827a\u672f\u5bb6\u51fa\u73b0\u6b21\u6570"},"content":{"rendered":"\n<p>\u8868\uff1a&nbsp;<code>Spotify<\/code><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">+-------------+---------+ \n| \u5217\u540d        | \u7c7b\u578b    | \n+-------------+---------+ \n| id          | int     | \n| track_name  | varchar |\n| artist      | varchar |\n+-------------+---------+\nid \u662f\u8be5\u8868\u7684\u4e3b\u952e(\u5177\u6709\u552f\u4e00\u503c\u7684\u5217)\u3002\n\u6bcf\u884c\u5305\u542b id\u3001track_name \u548c artist\u3002\n<\/pre>\n\n\n\n<p>\u7f16\u5199\u89e3\u51b3\u65b9\u6848\u6765\u67e5\u627e\u6bcf\u4e2a\u827a\u672f\u5bb6\u5728Spotify\u6392\u884c\u699c\u4e0a\u51fa\u73b0\u7684\u6b21\u6570\u3002<\/p>\n\n\n\n<p>\u8fd4\u56de\u7ed3\u679c\u8868\uff0c\u5176\u4e2d\u5305\u542b\u827a\u672f\u5bb6\u7684\u540d\u79f0\u4ee5\u53ca\u76f8\u5e94\u7684\u51fa\u73b0\u6b21\u6570\uff0c\u6309\u51fa\u73b0\u6b21\u6570&nbsp;<strong>\u964d\u5e8f&nbsp;<\/strong>\u6392\u5217\u3002\u5982\u679c\u51fa\u73b0\u6b21\u6570\u76f8\u7b49\uff0c\u5219\u6309\u827a\u672f\u5bb6\u540d\u79f0&nbsp;<strong>\u5347\u5e8f&nbsp;<\/strong>\u6392\u5217\u3002<\/p>\n\n\n\n<p>\u8fd4\u56de\u7ed3\u679c\u683c\u5f0f\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<p><strong>\u793a\u4f8b 1\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>\u8f93\u5165\uff1a\n<\/strong>Spotify \u8868: \n+---------+--------------------+------------+ \n| id      | track_name         | artist     |  \n+---------+--------------------+------------+\n| 303651  | Heart Won't Forget | Sia        |\n| 1046089 | Shape of you       | Ed Sheeran |\n| 33445   | I'm the one        | DJ Khalid  |\n| 811266  | Young Dumb &amp; Broke | DJ Khalid  | \n| 505727  | Happier            | Ed Sheeran |\n+---------+--------------------+------------+ \n<strong>\u8f93\u51fa\uff1a\n<\/strong>+------------+-------------+\n| artist     | occurrences | \n+------------+-------------+\n| DJ Khalid  | 2           |\n| Ed Sheeran | 2           |\n| Sia        | 1           | \n+------------+-------------+ \n\n<strong>\u89e3\u91ca\uff1a<\/strong>\"occurrences\" \u5217\u4e0b\u6309\u964d\u5e8f\u5217\u51fa\u4e86\u51fa\u73b0\u6b21\u6570\u7684\u8ba1\u6570\u3002\u5982\u679c\u51fa\u73b0\u6b21\u6570\u76f8\u540c\uff0c\u5219\u827a\u672f\u5bb6\u540d\u79f0\u6309\u5347\u5e8f\u6392\u5e8f\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>\u6478\u9c7c\u9898<\/em><\/cite><\/blockquote>\n\n\n\n<p>\u6478\u4e2a\u9c7c\u5148\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Write your MySQL query statement below\r\nSELECT artist,COUNT(artist) AS occurrences\r\nFROM Spotify\r\nGROUP BY artist\r\nORDER BY COUNT(artist) DESC,artist ASC<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Leetcode\u9898\u76ee\uff1a\u6478\u9c7c\u9898<\/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\/4124"}],"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=4124"}],"version-history":[{"count":0,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/posts\/4124\/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=4124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/categories?post=4124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/white-night.club\/index.php\/wp-json\/wp\/v2\/tags?post=4124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}