{"id":637,"date":"2021-10-24T20:12:48","date_gmt":"2021-10-24T12:12:48","guid":{"rendered":"https:\/\/www.dataisfun.cn\/?p=637"},"modified":"2021-10-24T20:12:51","modified_gmt":"2021-10-24T12:12:51","slug":"sql%e7%8e%af%e6%af%94%e5%90%8c%e6%af%94","status":"publish","type":"post","link":"https:\/\/www.dataisfun.cn\/?p=637","title":{"rendered":"SQL-\u7ecf\u5178\u7684\u73af\u6bd4\u540c\u6bd4\u95ee\u9898"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\" style=\"font-size:12px\">\u8001\u751f\u5e38\u8c08\uff0c\u6307\u6807\u4e0d\u662f\u5b64\u7acb\u7684\uff0c\u5fc5\u987b\u6709\u5bf9\u6bd4\u624d\u6709\u610f\u4e49\uff0c\u73af\u6bd4\u548c\u540c\u6bd4\u5c31\u662f\u5c06\u5f53\u524d\u7684\u6307\u6807\u503c\u4e0e\u8fc7\u5f80\u7684\u6307\u6807\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4ece\u800c\u8868\u660e\u5f53\u524d\u7684\u6307\u6807\u503c\u662f\u597d\u662f\u574f\u3002\u73af\u6bd4\u662f\u8ddf\u4e0a\u4e00\u4e2a\u5468\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u6708\u6216\u5468)\uff0c\u540c\u6bd4\u662f\u8ddf\u5386\u53f2\u540c\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u5e74)\uff0c\u533a\u5206\u73af\u6bd4\u548c\u540c\u6bd4\u4e3b\u8981\u770b\u65f6\u95f4\u5468\u671f\u662f\u5426\u8fde\u7eed\uff0c\u6bd4\u5982\uff0c\u4eca\u5929\u6bd4\u6628\u5929\u3001\u672c\u5468\u6bd4\u4e0a\u5468\u3001\u672c\u6708\u6bd4\u4e0a\u6708\u90fd\u662f\u73af\u6bd4\uff0c\u672c\u5468\u4e8c\u6bd4\u4e0a\u5468\u4e8c\u30012021\u5e743\u6708\u6bd42019\u5e743\u6708\u90fd\u662f\u540c\u6bd4\uff0c2020\u5e74\u5168\u5e74\u6bd42019\u5e74\u5168\u5e74\u65e2\u662f\u540c\u6bd4\u4e5f\u662f\u73af\u6bd4\uff0c\u901a\u5e38\u79f0\u4e3a\u540c\u6bd4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:12px\">\u7406\u6e05\u695a\u73af\u6bd4\u540c\u6bd4\u7684\u4f5c\u7528\u548c\u6982\u5ff5\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b\u770b SQL\u73af\u6bd4\u540c\u6bd4 \u7684\u5b9e\u73b0\u3002\u5047\u8bbe\u6211\u4eec\u5df2\u6709\u5982\u4e0b\u7684\u9500\u552e\u660e\u7ec6\u8868sales\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dataisfun.cn\/wp-content\/uploads\/2021\/10\/\u73af\u6bd4\u540c\u6bd41.png\" alt=\"\" class=\"wp-image-644\" width=\"253\" height=\"768\" srcset=\"https:\/\/www.dataisfun.cn\/wp-content\/uploads\/2021\/10\/\u73af\u6bd4\u540c\u6bd41.png 506w, https:\/\/www.dataisfun.cn\/wp-content\/uploads\/2021\/10\/\u73af\u6bd4\u540c\u6bd41-99x300.png 99w\" sizes=\"auto, (max-width: 253px) 100vw, 253px\" \/><\/figure>\n\n\n\n<ul class=\"has-vivid-cyan-blue-color has-text-color wp-block-list\" style=\"font-size:12px\"><li><strong>\u7edf\u8ba1\u6bcf\u7c7b\u4ea7\u54c1\u7684\u6bcf\u6708\u9500\u552e\u603b\u989d\u5e76\u8ba1\u7b97\u73af\u6bd4\u540c\u6bd4\uff1a<\/strong><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:12px\"><strong>\u793a\u4f8b\u4ee3\u7801\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"sql\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\n--\u65b9\u6cd51\uff1a\u8ba1\u7b97\u73af\u6bd4\u540c\u6bd4\u6240\u5bf9\u5e94\u7684\u5468\u671f, \u7136\u540e\u5339\u914d\u8ba1\u7b97\nwith\n--1\uff1a\u6309\u4ea7\u54c1+\u6708\u4efd\u5206\u7ec4\u6c47\u603b\n    tmp1 as (\n        select\n            product,\n            date_trunc('month', order_date) as order_month,\n            sum(amount) as amount\n        from sales\n        group by 1,2\n    ),\n\n--2\uff1a\u8ba1\u7b97\u73af\u6bd4\u540c\u6bd4\u6240\u5bf9\u5e94\u7684\u6708\u4efd\n    tmp2 as (\n        select\n            product,\n            order_month,\n            date_trunc('month', order_month - interval '1' day) as bef_1M_month,\n            order_month - interval '12' month as bef_1Y_month,\n            amount\n        from tmp1\n    ),\n\n--3\uff1a\u5339\u914d\u73af\u6bd4\u540c\u6bd4\u6240\u5bf9\u5e94\u7684\u503c\n    tmp3 as (\n        select\n            t1.product,\n            t1.order_month,\n            t1.amount,\n            t2.amount as bef_1M_month_amount,\n            t3.amount as bef_1Y_month_amount\n        from tmp2 as t1\n        left join tmp1 as t2\n        on t1.product = t2.product and t1.bef_1M_month = t2.order_month\n        left join tmp1 as t3\n        on t1.product = t3.product and t1.bef_1Y_month = t3.order_month\n    )\n\n--4\uff1a\u8ba1\u7b97\u73af\u6bd4\u540c\u6bd4\nselect\n    product,\n    order_month,\n    amount,\n    round((amount - bef_1M_month_amount)\/bef_1M_month_amount,4) as ratio_month_on_month,\n    round((amount - bef_1Y_month_amount)\/bef_1Y_month_amount,4) as ratio_year_on_year\nfrom tmp3\norder by 1,2;\n\n\n\n--\u65b9\u6cd52\uff1a\u4f7f\u7528lag()\u7a97\u53e3\u51fd\u6570\u83b7\u53d6\u73af\u6bd4\u540c\u6bd4\u6240\u5bf9\u5e94\u7684\u503c,\u7136\u540e\u8ba1\u7b97\n--\u4ec5\u5f53\u6570\u636e\u4e2d\u7684\u65f6\u95f4\u5468\u671f\u662f\u8fde\u7eed\u7684\u4e0d\u7f3a\u5931\u7684\u65f6\u5019\u624d\u53ef\u4f7f\u7528\u6b64\u65b9\u6cd5\nwith\n--1\uff1a\u6309\u4ea7\u54c1+\u6708\u4efd\u5206\u7ec4\u6c47\u603b\n    tmp1 as (\n        select\n            product,\n            date_trunc('month', order_date) as order_month,\n            sum(amount) as amount\n        from sales\n        group by 1,2\n    ),\n \n--2\uff1a\u4f7f\u7528lag()\u7a97\u53e3\u51fd\u6570\u83b7\u53d6\u73af\u6bd4\u540c\u6bd4\u6240\u5bf9\u5e94\u7684\u503c\n    tmp2 as (\n        select\n            product,\n            order_month,\n            amount,\n            lag(amount,1) over (partition by product order by order_month) as bef_1M_month_amount,\n            lag(amount,12) over (partition by product order by order_month) as bef_1Y_month_amount\n        from tmp1\n    )\n\n--3\uff1a\u8ba1\u7b97\u73af\u6bd4\u540c\u6bd4\nselect\n    product,\n    order_month,\n    amount,\n    round((amount - bef_1M_month_amount)\/bef_1M_month_amount,4) as ratio_month_on_month,\n    round((amount - bef_1Y_month_amount)\/bef_1Y_month_amount,4) as ratio_year_on_year\nfrom tmp2\norder by 1,2;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:12px\"><strong>\u4ee3\u7801\u7ed3\u679c\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.dataisfun.cn\/wp-content\/uploads\/2021\/10\/\u73af\u6bd4\u540c\u6bd42.png\" alt=\"\" class=\"wp-image-645\" width=\"535\" height=\"590\" srcset=\"https:\/\/www.dataisfun.cn\/wp-content\/uploads\/2021\/10\/\u73af\u6bd4\u540c\u6bd42.png 1070w, https:\/\/www.dataisfun.cn\/wp-content\/uploads\/2021\/10\/\u73af\u6bd4\u540c\u6bd42-272x300.png 272w, https:\/\/www.dataisfun.cn\/wp-content\/uploads\/2021\/10\/\u73af\u6bd4\u540c\u6bd42-929x1024.png 929w, https:\/\/www.dataisfun.cn\/wp-content\/uploads\/2021\/10\/\u73af\u6bd4\u540c\u6bd42-768x846.png 768w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:12px\"> \u4ee5\u4e0a\u5c31\u662f SQL\u73af\u6bd4\u540c\u6bd4 \u7684\u5b9e\u73b0\uff0c\u4f7f\u7528Presto SQL\u6267\u884c\uff0c\u5176\u4ed6SQL\u5728\u65e5\u671f\u5904\u7406\u4e0a\u53ef\u80fd\u4f1a\u6709\u5dee\u5f02\u3002 \u80fd\u591f\u770b\u51fa\uff0c\u65b9\u6cd51\u7684\u901a\u7528\u6027\u66f4\u5f3a\uff0c\u5728\u5468\u671f\u662f\u8fde\u7eed\u7684\u4e0d\u7f3a\u5931\u7684\u60c5\u51b5\u4e0b\uff0c\u65b9\u6cd52\u66f4\u7b80\u6d01\u9ad8\u6548\uff0c\u6211\u4eec\u53ef\u89c6\u6e90\u6570\u636e\u60c5\u51b5\u9009\u7528\u65b9\u6cd51\u6216\u65b9\u6cd52\u3002 \u4e3a\u4fbf\u4e8e\u5c55\u793a\u5904\u7406\u903b\u8f91\uff0c\u793a\u4f8b\u4ee3\u7801\u4ee5\u5206\u6b65\u7684\u5f62\u5f0f\u8fdb\u884c\u5904\u7406\uff0c\u5b9e\u9645\u53d6\u6570\u65f6\u53ef\u4ee5\u5bf9\u4e2d\u95f4\u7684\u6b65\u9aa4\u8fdb\u884c\u5408\u5e76\uff0c\u4ee5\u4fbf\u63d0\u9ad8\u6548\u7387\u3002 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8001\u751f\u5e38\u8c08\uff0c\u6307\u6807\u4e0d\u662f\u5b64\u7acb\u7684\uff0c\u5fc5\u987b\u6709\u5bf9\u6bd4\u624d\u6709\u610f\u4e49\uff0c\u73af\u6bd4\u548c\u540c\u6bd4\u5c31\u662f\u5c06\u5f53\u524d\u7684\u6307\u6807\u503c\u4e0e\u8fc7\u5f80\u7684\u6307\u6807\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4ece&hellip; <a href=\"https:\/\/www.dataisfun.cn\/?p=637\" class=\"more-link read-more\" rel=\"bookmark\">\u7ee7\u7eed\u9605\u8bfb <span class=\"screen-reader-text\">SQL-\u7ecf\u5178\u7684\u73af\u6bd4\u540c\u6bd4\u95ee\u9898<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[6],"class_list":["post-637","post","type-post","status-publish","format-standard","hentry","category-sql","tag-sql","h-entry","h-as-article"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL\u73af\u6bd4\u540c\u6bd4 | SQL \u73af\u6bd4 \u540c\u6bd4 - \u6570\u636e\u597d\u73a9<\/title>\n<meta name=\"description\" content=\"\u73af\u6bd4\u548c\u540c\u6bd4\u5c31\u662f\u5c06\u5f53\u524d\u7684\u6307\u6807\u503c\u4e0e\u8fc7\u5f80\u7684\u6307\u6807\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4ece\u800c\u8868\u660e\u5f53\u524d\u7684\u6307\u6807\u503c\u662f\u597d\u662f\u574f\u3002\u73af\u6bd4\u662f\u8ddf\u4e0a\u4e00\u4e2a\u5468\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u6708\u6216\u5468)\uff0c\u540c\u6bd4\u662f\u8ddf\u5386\u53f2\u540c\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u5e74)\u3002\u7406\u6e05\u695a\u73af\u6bd4\u540c\u6bd4\u7684\u4f5c\u7528\u548c\u6982\u5ff5\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b\u770b SQL\u73af\u6bd4\u540c\u6bd4 \u7684\u5b9e\u73b0\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dataisfun.cn\/?p=637\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL\u73af\u6bd4\u540c\u6bd4 | SQL \u73af\u6bd4 \u540c\u6bd4 - \u6570\u636e\u597d\u73a9\" \/>\n<meta property=\"og:description\" content=\"\u73af\u6bd4\u548c\u540c\u6bd4\u5c31\u662f\u5c06\u5f53\u524d\u7684\u6307\u6807\u503c\u4e0e\u8fc7\u5f80\u7684\u6307\u6807\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4ece\u800c\u8868\u660e\u5f53\u524d\u7684\u6307\u6807\u503c\u662f\u597d\u662f\u574f\u3002\u73af\u6bd4\u662f\u8ddf\u4e0a\u4e00\u4e2a\u5468\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u6708\u6216\u5468)\uff0c\u540c\u6bd4\u662f\u8ddf\u5386\u53f2\u540c\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u5e74)\u3002\u7406\u6e05\u695a\u73af\u6bd4\u540c\u6bd4\u7684\u4f5c\u7528\u548c\u6982\u5ff5\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b\u770b SQL\u73af\u6bd4\u540c\u6bd4 \u7684\u5b9e\u73b0\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dataisfun.cn\/?p=637\" \/>\n<meta property=\"og:site_name\" content=\"\u6570\u636e\u597d\u73a9\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-24T12:12:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-24T12:12:51+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dataisfun.cn\/?p=637\",\"url\":\"https:\/\/www.dataisfun.cn\/?p=637\",\"name\":\"SQL\u73af\u6bd4\u540c\u6bd4 | SQL \u73af\u6bd4 \u540c\u6bd4 - \u6570\u636e\u597d\u73a9\",\"isPartOf\":{\"@id\":\"https:\/\/www.dataisfun.cn\/#website\"},\"datePublished\":\"2021-10-24T12:12:48+00:00\",\"dateModified\":\"2021-10-24T12:12:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.dataisfun.cn\/#\/schema\/person\/026bc03694bbf1608ccc639fb31c3293\"},\"description\":\"\u73af\u6bd4\u548c\u540c\u6bd4\u5c31\u662f\u5c06\u5f53\u524d\u7684\u6307\u6807\u503c\u4e0e\u8fc7\u5f80\u7684\u6307\u6807\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4ece\u800c\u8868\u660e\u5f53\u524d\u7684\u6307\u6807\u503c\u662f\u597d\u662f\u574f\u3002\u73af\u6bd4\u662f\u8ddf\u4e0a\u4e00\u4e2a\u5468\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u6708\u6216\u5468)\uff0c\u540c\u6bd4\u662f\u8ddf\u5386\u53f2\u540c\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u5e74)\u3002\u7406\u6e05\u695a\u73af\u6bd4\u540c\u6bd4\u7684\u4f5c\u7528\u548c\u6982\u5ff5\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b\u770b SQL\u73af\u6bd4\u540c\u6bd4 \u7684\u5b9e\u73b0\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.dataisfun.cn\/?p=637#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dataisfun.cn\/?p=637\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dataisfun.cn\/?p=637#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.dataisfun.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL-\u7ecf\u5178\u7684\u73af\u6bd4\u540c\u6bd4\u95ee\u9898\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dataisfun.cn\/#website\",\"url\":\"https:\/\/www.dataisfun.cn\/\",\"name\":\"\u6570\u636e\u597d\u73a9\",\"description\":\"\u6570\u4e2d\u81ea\u6709\u4e7e\u5764\uff0c\u4e8e\u4e50\u8da3\u4e2d\u53d1\u73b0\u4ef7\u503c\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dataisfun.cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dataisfun.cn\/#\/schema\/person\/026bc03694bbf1608ccc639fb31c3293\",\"name\":\"admin\",\"sameAs\":[\"http:\/\/www.dataisfun.cn\"],\"url\":\"https:\/\/www.dataisfun.cn\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL\u73af\u6bd4\u540c\u6bd4 | SQL \u73af\u6bd4 \u540c\u6bd4 - \u6570\u636e\u597d\u73a9","description":"\u73af\u6bd4\u548c\u540c\u6bd4\u5c31\u662f\u5c06\u5f53\u524d\u7684\u6307\u6807\u503c\u4e0e\u8fc7\u5f80\u7684\u6307\u6807\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4ece\u800c\u8868\u660e\u5f53\u524d\u7684\u6307\u6807\u503c\u662f\u597d\u662f\u574f\u3002\u73af\u6bd4\u662f\u8ddf\u4e0a\u4e00\u4e2a\u5468\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u6708\u6216\u5468)\uff0c\u540c\u6bd4\u662f\u8ddf\u5386\u53f2\u540c\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u5e74)\u3002\u7406\u6e05\u695a\u73af\u6bd4\u540c\u6bd4\u7684\u4f5c\u7528\u548c\u6982\u5ff5\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b\u770b SQL\u73af\u6bd4\u540c\u6bd4 \u7684\u5b9e\u73b0\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dataisfun.cn\/?p=637","og_locale":"zh_CN","og_type":"article","og_title":"SQL\u73af\u6bd4\u540c\u6bd4 | SQL \u73af\u6bd4 \u540c\u6bd4 - \u6570\u636e\u597d\u73a9","og_description":"\u73af\u6bd4\u548c\u540c\u6bd4\u5c31\u662f\u5c06\u5f53\u524d\u7684\u6307\u6807\u503c\u4e0e\u8fc7\u5f80\u7684\u6307\u6807\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4ece\u800c\u8868\u660e\u5f53\u524d\u7684\u6307\u6807\u503c\u662f\u597d\u662f\u574f\u3002\u73af\u6bd4\u662f\u8ddf\u4e0a\u4e00\u4e2a\u5468\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u6708\u6216\u5468)\uff0c\u540c\u6bd4\u662f\u8ddf\u5386\u53f2\u540c\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u5e74)\u3002\u7406\u6e05\u695a\u73af\u6bd4\u540c\u6bd4\u7684\u4f5c\u7528\u548c\u6982\u5ff5\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b\u770b SQL\u73af\u6bd4\u540c\u6bd4 \u7684\u5b9e\u73b0\u3002","og_url":"https:\/\/www.dataisfun.cn\/?p=637","og_site_name":"\u6570\u636e\u597d\u73a9","article_published_time":"2021-10-24T12:12:48+00:00","article_modified_time":"2021-10-24T12:12:51+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.dataisfun.cn\/?p=637","url":"https:\/\/www.dataisfun.cn\/?p=637","name":"SQL\u73af\u6bd4\u540c\u6bd4 | SQL \u73af\u6bd4 \u540c\u6bd4 - \u6570\u636e\u597d\u73a9","isPartOf":{"@id":"https:\/\/www.dataisfun.cn\/#website"},"datePublished":"2021-10-24T12:12:48+00:00","dateModified":"2021-10-24T12:12:51+00:00","author":{"@id":"https:\/\/www.dataisfun.cn\/#\/schema\/person\/026bc03694bbf1608ccc639fb31c3293"},"description":"\u73af\u6bd4\u548c\u540c\u6bd4\u5c31\u662f\u5c06\u5f53\u524d\u7684\u6307\u6807\u503c\u4e0e\u8fc7\u5f80\u7684\u6307\u6807\u503c\u8fdb\u884c\u5bf9\u6bd4\uff0c\u4ece\u800c\u8868\u660e\u5f53\u524d\u7684\u6307\u6807\u503c\u662f\u597d\u662f\u574f\u3002\u73af\u6bd4\u662f\u8ddf\u4e0a\u4e00\u4e2a\u5468\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u6708\u6216\u5468)\uff0c\u540c\u6bd4\u662f\u8ddf\u5386\u53f2\u540c\u671f\u6bd4(\u5468\u671f\u901a\u5e38\u662f\u5e74)\u3002\u7406\u6e05\u695a\u73af\u6bd4\u540c\u6bd4\u7684\u4f5c\u7528\u548c\u6982\u5ff5\u540e\uff0c\u6211\u4eec\u518d\u6765\u770b\u770b SQL\u73af\u6bd4\u540c\u6bd4 \u7684\u5b9e\u73b0\u3002","breadcrumb":{"@id":"https:\/\/www.dataisfun.cn\/?p=637#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dataisfun.cn\/?p=637"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dataisfun.cn\/?p=637#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.dataisfun.cn\/"},{"@type":"ListItem","position":2,"name":"SQL-\u7ecf\u5178\u7684\u73af\u6bd4\u540c\u6bd4\u95ee\u9898"}]},{"@type":"WebSite","@id":"https:\/\/www.dataisfun.cn\/#website","url":"https:\/\/www.dataisfun.cn\/","name":"\u6570\u636e\u597d\u73a9","description":"\u6570\u4e2d\u81ea\u6709\u4e7e\u5764\uff0c\u4e8e\u4e50\u8da3\u4e2d\u53d1\u73b0\u4ef7\u503c","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dataisfun.cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.dataisfun.cn\/#\/schema\/person\/026bc03694bbf1608ccc639fb31c3293","name":"admin","sameAs":["http:\/\/www.dataisfun.cn"],"url":"https:\/\/www.dataisfun.cn\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=\/wp\/v2\/posts\/637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=637"}],"version-history":[{"count":7,"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=\/wp\/v2\/posts\/637\/revisions"}],"predecessor-version":[{"id":647,"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=\/wp\/v2\/posts\/637\/revisions\/647"}],"wp:attachment":[{"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dataisfun.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}