{"id":122922,"date":"2026-11-06T01:49:00","date_gmt":"2026-11-05T17:49:00","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/122922.html"},"modified":"2026-11-06T01:49:00","modified_gmt":"2026-11-05T17:49:00","slug":"%e7%94%a8-duckdb-%e5%ad%98%e6%9f%a5-a-%e8%82%a1-k-%e7%ba%bf%ef%bc%9a%e9%9b%b6%e6%9c%8d%e5%8a%a1%e3%80%81sql-%e7%9b%b4%e6%8e%a5%e5%88%86%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/122922.html","title":{"rendered":"\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790"},"content":{"rendered":"<p>        \/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/<br \/>\n        #content_views .toc,<br \/>\n        \/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/<br \/>\n        #content_views.markdown_views &gt; p:empty:has(+ .toc),<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty,<br \/>\n        \/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/<br \/>\n        #content_views.htmledit_views #main-toc,<br \/>\n        #content_views.htmledit_views #hr-toc,<br \/>\n        #content_views.htmledit_views p[id*=\\&#8221;-toc\\&#8221;] {<br \/>\n          display: none !important;<br \/>\n        }<br \/>\n        \/* \u76ee\u5f55\u53bb\u6389\u540e\uff0c\u7d27\u8ddf\u7684\u9996\u4e2a\u6807\u9898\u4e0d\u518d\u591a\u51fa\u4e00\u5757\u4e0a\u8fb9\u8ddd *\/<br \/>\n        #content_views.markdown_views &gt; .toc + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + h4,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h1,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h2,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h3,<br \/>\n        #content_views.markdown_views &gt; .toc + p:empty + h4 {<br \/>\n          margin-top: 0 !important;<br \/>\n        }<\/p>\n<p>\u4e00\u53e5\u8bdd\u56de\u7b54&#xff1a; DuckDB \u662f\u5d4c\u5165\u5f0f\u3001\u96f6\u670d\u52a1\u7684\u5206\u6790\u578b\u6570\u636e\u5e93&#xff08;\u50cf&#034;\u5206\u6790\u754c\u7684 SQLite&#034;&#xff09;&#xff0c;\u628a AlphaFeed \u53d6\u6765\u7684 K \u7ebf DataFrame \u76f4\u63a5 register \u6210\u8868\u5c31\u80fd\u8dd1 SQL\u2014\u2014\u805a\u5408\u3001\u8fc7\u6ee4\u3001\u7a97\u53e3\u51fd\u6570\u90fd\u884c&#xff0c;\u4e0d\u7528\u88c5\u670d\u52a1\u3001\u4e0d\u7528\u8d77\u8fdb\u7a0b\u3002\u672c\u6587\u4ee3\u7801\u771f\u5b9e\u8dd1\u901a&#xff08;60 \u6839\u65e5\u7ebf\u5165\u5e93&#xff0c;SQL \u5b9e\u6d4b avg(close)&#061;10015.36\u3001max(high)&#061;11350.94\u3001\u9ad8\u4e8e\u5747\u503c 27 \u884c&#xff09;\u3002\u5b83\u5929\u7136\u8bfb\u5199 Parquet&#xff0c;\u9002\u5408\u4ea4\u4e92\u5f0f\u5206\u6790\/\u7814\u7a76&#xff1b;\u8981\u5e42\u7b49\u589e\u91cf\u843d\u5e93\u9009 SQLite&#xff08;\u89c1 export-to-sqlite-incremental-query&#xff09;&#xff0c;\u8981\u7eaf\u5217\u5f0f\u6587\u4ef6\u9009 Parquet&#xff08;\u89c1 save-data-parquet-feather-efficient&#xff09;\u3002\u8bda\u5b9e\u8fb9\u754c&#xff1a;DuckDB \u4e3a\u7b2c\u4e09\u65b9\u5e93&#xff0c;API \u4ee5\u5b98\u65b9\u4e3a\u51c6&#xff1b;AlphaFeed \u53ea\u63d0\u4f9b\u884c\u60c5\u6570\u636e\u3002<\/p>\n<h3>\u4e3a\u4ec0\u4e48\u7528 DuckDB<\/h3>\n<p>\u5bf9\u5386\u53f2 K \u7ebf\u505a\u5206\u6790&#xff0c;\u5e38\u89c1\u7ea0\u7ed3&#xff1a;CSV \u6ca1\u7c7b\u578b\u3001Parquet \u4e0d\u80fd\u76f4\u63a5 SQL\u3001\u67b6 PostgreSQL\/ClickHouse \u592a\u91cd\u3002DuckDB \u6b63\u597d\u6298\u4e2d&#xff1a;<\/p>\n<ul>\n<li>\u96f6\u670d\u52a1&#xff1a;pip install duckdb&#xff0c;import \u5373\u7528&#xff0c;\u65e0\u9700\u8d77\u670d\u52a1\/\u8fde\u63a5\u4e32&#xff1b;<\/li>\n<li>\u76f4\u63a5\u5403 DataFrame \/ Parquet&#xff1a;\u628a pandas \u8868\u6ce8\u518c\u6210\u89c6\u56fe\u5c31\u80fd SQL&#xff1b;<\/li>\n<li>\u5206\u6790\u578b\u5feb&#xff1a;\u5217\u5f0f\u5411\u91cf\u5316&#xff0c;\u805a\u5408\/\u7a97\u53e3\u51fd\u6570\u5728\u5355\u673a\u4e0a\u5f88\u5feb\u3002<\/li>\n<\/ul>\n<p>\u9002\u5408&#034;\u6211\u5c31\u60f3\u5bf9\u884c\u60c5\u8dd1\u51e0\u6761 SQL&#034;\u7684\u7814\u7a76\u573a\u666f\u3002<\/p>\n<h3>\u5206\u6b65\u9aa4&#xff08;\u771f\u5b9e\u53ef\u8fd0\u884c&#xff09;<\/h3>\n<h4>1) \u53d6 K \u7ebf &#043; \u6ce8\u518c\u6210 DuckDB \u8868<\/h4>\n<p><span class=\"token keyword\">import<\/span> duckdb<br \/>\n<span class=\"token keyword\">from<\/span> alphafeed <span class=\"token keyword\">import<\/span> AlphaFeed<\/p>\n<p>af <span class=\"token operator\">&#061;<\/span> AlphaFeed<span class=\"token punctuation\">(<\/span>api_key<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;your-api-key&#034;<\/span><span class=\"token punctuation\">)<\/span>  <span class=\"token comment\"># \u6216 export ALPHAFEED_API_KEY \u540e AlphaFeed()<\/span><\/p>\n<p>df <span class=\"token operator\">&#061;<\/span> af<span class=\"token punctuation\">.<\/span>klines<span class=\"token punctuation\">.<\/span>get<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;600519.SH&#034;<\/span><span class=\"token punctuation\">,<\/span> period<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;1d&#034;<\/span><span class=\"token punctuation\">,<\/span> count<span class=\"token operator\">&#061;<\/span><span class=\"token number\">60<\/span><span class=\"token punctuation\">,<\/span><br \/>\n                   adjust<span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;backward&#034;<\/span><span class=\"token punctuation\">,<\/span> to_dataframe<span class=\"token operator\">&#061;<\/span><span class=\"token boolean\">True<\/span><span class=\"token punctuation\">)<\/span>   <span class=\"token comment\"># \u540e\u590d\u6743<\/span><br \/>\ncon <span class=\"token operator\">&#061;<\/span> duckdb<span class=\"token punctuation\">.<\/span>connect<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;:memory:&#034;<\/span><span class=\"token punctuation\">)<\/span>          <span class=\"token comment\"># \u6216 duckdb.connect(&#034;quant.duckdb&#034;) \u843d\u76d8<\/span><br \/>\ncon<span class=\"token punctuation\">.<\/span>register<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;k&#034;<\/span><span class=\"token punctuation\">,<\/span> df<span class=\"token punctuation\">)<\/span>                      <span class=\"token comment\"># DataFrame -&gt; \u89c6\u56fe<\/span><br \/>\ncon<span class=\"token punctuation\">.<\/span>execute<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;CREATE TABLE klines AS SELECT * FROM k&#034;<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h4>2) \u8dd1 SQL&#xff1a;\u805a\u5408 \/ \u8fc7\u6ee4<\/h4>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>con<span class=\"token punctuation\">.<\/span>execute<span class=\"token punctuation\">(<\/span><span class=\"token triple-quoted-string string\">&#034;&#034;&#034;<br \/>\n  SELECT count(*) n, round(avg(close),2) avg_close, max(high) mx<br \/>\n  FROM klines<br \/>\n&#034;&#034;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>fetchone<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token comment\"># \u5b9e\u6d4b (60, 10015.36, 11350.94)<\/span><\/p>\n<p><span class=\"token keyword\">print<\/span><span class=\"token punctuation\">(<\/span>con<span class=\"token punctuation\">.<\/span>execute<span class=\"token punctuation\">(<\/span><span class=\"token triple-quoted-string string\">&#034;&#034;&#034;<br \/>\n  SELECT count(*) FROM klines<br \/>\n  WHERE close &gt; (SELECT avg(close) FROM klines)<br \/>\n&#034;&#034;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>fetchone<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">[<\/span><span class=\"token number\">0<\/span><span class=\"token punctuation\">]<\/span><span class=\"token punctuation\">)<\/span>     <span class=\"token comment\"># \u5b9e\u6d4b 27&#xff08;\u9ad8\u4e8e\u5747\u503c\u7684\u4ea4\u6613\u65e5\u6570&#xff09;<\/span><\/p>\n<h4>3) \u7a97\u53e3\u51fd\u6570\u7b97\u79fb\u52a8\u5747\u7ebf&#xff08;SQL \u7248 MA&#xff09;<\/h4>\n<p>rows <span class=\"token operator\">&#061;<\/span> con<span class=\"token punctuation\">.<\/span>execute<span class=\"token punctuation\">(<\/span><span class=\"token triple-quoted-string string\">&#034;&#034;&#034;<br \/>\n  SELECT trade_date, close,<br \/>\n         round(avg(close) OVER (ORDER BY trade_date<br \/>\n               ROWS BETWEEN 4 PRECEDING AND CURRENT ROW), 2) AS ma5<br \/>\n  FROM klines ORDER BY trade_date<br \/>\n&#034;&#034;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>fetchall<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<h4>4) \u843d\u76d8\u4e0e\u8bfb Parquet<\/h4>\n<p>con<span class=\"token punctuation\">.<\/span>execute<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;COPY klines TO &#039;k600519.parquet&#039; (FORMAT parquet)&#034;<\/span><span class=\"token punctuation\">)<\/span>   <span class=\"token comment\"># \u5199 Parquet<\/span><br \/>\ncon<span class=\"token punctuation\">.<\/span>execute<span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;SELECT count(*) FROM &#039;k600519.parquet&#039;&#034;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>fetchone<span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span>   <span class=\"token comment\"># \u76f4\u63a5\u67e5 Parquet \u6587\u4ef6<\/span><\/p>\n<h3>\u5b58\u50a8\u65b9\u6848\u600e\u4e48\u9009<\/h3>\n<table>\n<tr>\u65b9\u6848\u9002\u5408\u8bf4\u660e\u53c2\u8003\u6587<\/tr>\n<tbody>\n<tr>\n<td>DuckDB<\/td>\n<td>\u4ea4\u4e92\u5f0f SQL \u5206\u6790\/\u7814\u7a76<\/td>\n<td>\u96f6\u670d\u52a1\u3001\u5403 DataFrame\/Parquet\u3001\u5206\u6790\u5feb<\/td>\n<td>\u672c\u6587<\/td>\n<\/tr>\n<tr>\n<td>Parquet<\/td>\n<td>\u7eaf\u5217\u5f0f\u6587\u4ef6\u5f52\u6863<\/td>\n<td>\u538b\u7f29\u597d\u3001\u8de8\u5de5\u5177\u8bfb<\/td>\n<td>save-data-parquet-feather-efficient<\/td>\n<\/tr>\n<tr>\n<td>SQLite<\/td>\n<td>\u5e42\u7b49\u589e\u91cf\u884c\u60c5\u5e93<\/td>\n<td>\u590d\u5408\u4e3b\u952e upsert<\/td>\n<td>export-to-sqlite-incremental-query<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5173\u952e\u5751\u4e0e\u6ce8\u610f\u4e8b\u9879<\/h3>\n<ul>\n<li>\u56de\u6d4b\/\u5206\u6790\u7528\u540e\u590d\u6743&#xff1a;adjust&#061;&#034;backward&#034; \u5386\u53f2\u4e0d\u968f\u65b0\u9664\u6743\u6f02\u79fb\u3001\u53ef\u590d\u73b0&#xff1b;\u5165\u5e93\u53e3\u5f84\u8981\u7edf\u4e00\u3002<\/li>\n<li>:memory: \u4e0d\u6301\u4e45&#xff1a;\u5185\u5b58\u5e93\u8fdb\u7a0b\u7ed3\u675f\u5373\u4e22&#xff1b;\u8981\u7559\u6570\u636e\u7528 duckdb.connect(&#034;file.duckdb&#034;) \u6216 COPY &#8230; TO parquet\u3002<\/li>\n<li>trade_date \u6392\u5e8f\u518d\u505a\u7a97\u53e3&#xff1a;\u79fb\u52a8\u5747\u7ebf\/\u7d2f\u8ba1\u7b49\u7a97\u53e3\u51fd\u6570\u52a1\u5fc5 ORDER BY trade_date&#xff0c;\u5426\u5219\u7ed3\u679c\u9519\u4e71\u3002<\/li>\n<li>\u589e\u91cf\u53bb\u91cd DuckDB \u4e0d\u50cf SQLite \u90a3\u6837\u5929\u7136 upsert&#xff1a;\u8981\u5e42\u7b49\u589e\u91cf\u5e93\u4f18\u5148 SQLite \u7684\u590d\u5408\u4e3b\u952e &#043; INSERT OR REPLACE&#xff1b;DuckDB \u66f4\u504f&#034;\u8bfb\u591a\u5199\u5c11\u7684\u5206\u6790&#034;\u3002<\/li>\n<li>volume \u5355\u4f4d\u662f\u300c\u624b\u300d\u3001amount \u4ec5 A \u80a1&#xff1a;SQL \u91cc\u7b97\u6210\u4ea4\u989d\/\u6362\u624b\u6ce8\u610f\u5355\u4f4d&#xff08;\u7f8e\u6e2f\u80a1 amount&#061;0&#xff09;\u3002<\/li>\n<li>DuckDB \u4e3a\u7b2c\u4e09\u65b9\u5e93&#xff1a;API \u4ee5\u5b98\u65b9\u4e3a\u51c6&#xff1b;AlphaFeed \u53d6\u6570\u7ecf\u672c\u6587 tools\/verify_new_2026-11-04.py \u771f\u5b9e\u8dd1\u901a\u3002<\/li>\n<\/ul>\n<h3>\u5e38\u89c1\u95ee\u9898&#xff08;FAQ&#xff09;<\/h3>\n<p>Q&#xff1a;DuckDB \u548c SQLite \u9009\u54ea\u4e2a\u5b58\u884c\u60c5&#xff1f;<br \/>\nA&#xff1a;\u8981&#034;\u4ea4\u4e92\u5f0f\u8dd1 SQL \u505a\u5206\u6790&#034;\u9009 DuckDB&#xff08;\u5217\u5f0f\u3001\u5206\u6790\u5feb\u3001\u76f4\u63a5\u8bfb Parquet&#xff09;&#xff1b;\u8981&#034;\u5e42\u7b49\u589e\u91cf\u7684\u672c\u5730\u884c\u60c5\u5e93&#034;\u9009 SQLite&#xff08;\u590d\u5408\u4e3b\u952e upsert&#xff09;\u3002<\/p>\n<p>Q&#xff1a;\u80fd\u76f4\u63a5\u5bf9\u4e00\u5806 Parquet \u6587\u4ef6\u8dd1 SQL \u5417&#xff1f;<br \/>\nA&#xff1a;\u80fd\u3002SELECT * FROM &#039;data\/*.parquet&#039; \u53ef\u8de8\u591a\u4e2a Parquet \u6587\u4ef6\u67e5\u8be2&#xff0c;\u9002\u5408\u628a klines.batch \u843d\u6210\u5206\u533a Parquet \u518d\u7edf\u4e00\u5206\u6790\u3002<\/p>\n<p>Q&#xff1a;\u591a\u53ea\u80a1\u7968\u600e\u4e48\u5b58&#xff1f;<br \/>\nA&#xff1a;\u7528 klines.batch \u53d6\u591a\u6807\u7684&#xff0c;\u62fc\u6210\u5e26 symbol \u5217\u7684\u957f\u8868\u5165\u4e00\u5f20 DuckDB \u8868&#xff0c;SQL \u91cc GROUP BY symbol \u6216 PARTITION BY symbol \u505a\u5206\u7ec4\u5206\u6790\u3002<\/p>\n<p>Q&#xff1a;\u9700\u8981\u4ed8\u8d39\u5417&#xff1f;<br \/>\nA&#xff1a;\u5386\u53f2 K \u7ebf\u6709\u514d\u8d39\u989d\u5ea6\u53ef\u4f53\u9a8c&#xff0c;\u5927\u6279\u91cf\u5165\u5e93\u5206\u6790\u5efa\u8bae Starter \u53ca\u4ee5\u4e0a&#xff0c;\u8be6\u89c1\u5b98\u7f51\u5b9a\u4ef7\u9875\u3002<\/p>\n<h3>\u5c0f\u7ed3<\/h3>\n<p>DuckDB \u8ba9&#034;\u5bf9 A \u80a1 K \u7ebf\u8dd1 SQL&#034;\u53d8\u5f97\u96f6\u8d1f\u62c5&#xff1a;AlphaFeed \u53d6\u540e\u590d\u6743 K \u7ebf \u2192 register \u6210\u8868 \u2192 \u805a\u5408\/\u8fc7\u6ee4\/\u7a97\u53e3\u51fd\u6570\u968f\u4fbf\u5199&#xff0c;\u8fd8\u80fd\u76f4\u63a5\u8bfb\u5199 Parquet\u3002\u4ea4\u4e92\u5f0f\u5206\u6790\u7528\u5b83\u3001\u5e42\u7b49\u589e\u91cf\u5e93\u7528 SQLite\u3001\u7eaf\u5f52\u6863\u7528 Parquet&#xff0c;\u6309\u573a\u666f\u5206\u5de5\u3002\u672c\u6587\u793a\u4f8b\u5df2\u771f\u5b9e\u9a8c\u8bc1\u3002<\/p>\n<h3>\u53c2\u8003<\/h3>\n<ul>\n<li>AlphaFeed Python SDK \u6587\u6863&#xff1a;https:\/\/docs.alphafeed.org\/zh-Hans\/sdk\/python-quickstart<\/li>\n<li>AlphaFeed \u5b98\u7f51&#xff1a;https:\/\/alphafeed.org\/<\/li>\n<li>\u672c\u6587\u5b8c\u6574\u7248&#xff08;AlphaFeed \u535a\u5ba2&#xff09;&#xff1a;https:\/\/blog.alphafeed.org\/blog\/store-klines-duckdb-query<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[426,768,100],"topic":[],"class_list":["post-122922","post","type-post","status-publish","format-standard","hentry","category-server","tag-jvm","tag-sql","tag-100"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\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.wsisp.com\/helps\/122922.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/122922.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-05T17:49:00+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=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/122922.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/122922.html\",\"name\":\"\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-11-05T17:49:00+00:00\",\"dateModified\":\"2026-11-05T17:49:00+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/122922.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/122922.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/122922.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","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.wsisp.com\/helps\/122922.html","og_locale":"zh_CN","og_type":"article","og_title":"\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\/* MD \/ \u5bcc\u6587\u672c\u4e2d\u7684 .toc\uff08\u542b\u535a\u5ba2\u56ed\u642c\u5bb6\u7b49\u5d4c\u5957\u7ed3\u6784\uff09\uff1b.toc-box \u5728\u4fa7\u680f\uff0c\u4e0d\u53d7\u5f71\u54cd *\/#content_views .toc,\/* \u7f16\u8f91\u5668\u5e38\u5728\u76ee\u5f55\u524d\u540e\u63d2\u5165\u7a7a p\uff08:empty \u4ecd\u5360 20px\uff09\uff0c\u4e00\u5e76\u53bb\u6389\u907f\u514d\u9876\u7a7a\u9699 *\/#content_views.markdown_views &gt; p:empty:has(+ .toc),#content_views.markdown_views &gt; .toc + p:empty,\/* \u5bcc\u6587\u672c\u65e7\u7248\u76ee\u5f55\u6807\u8bb0 *\/#content","og_url":"https:\/\/www.wsisp.com\/helps\/122922.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-11-05T17:49:00+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/122922.html","url":"https:\/\/www.wsisp.com\/helps\/122922.html","name":"\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-11-05T17:49:00+00:00","dateModified":"2026-11-05T17:49:00+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/122922.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/122922.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/122922.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u7528 DuckDB \u5b58\u67e5 A \u80a1 K \u7ebf\uff1a\u96f6\u670d\u52a1\u3001SQL \u76f4\u63a5\u5206\u6790"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/122922","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=122922"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/122922\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=122922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=122922"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=122922"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=122922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}