{"id":6740,"date":"2024-11-14T12:26:28","date_gmt":"2024-11-14T04:26:28","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6740\/"},"modified":"2024-11-14T12:26:28","modified_gmt":"2024-11-14T04:26:28","slug":"%e5%a6%82%e4%bd%95%e5%b0%86%e5%a4%9a%e6%9d%a1%e6%97%a5%e6%9c%9f%e5%8c%ba%e9%97%b4%e7%bb%9f%e8%ae%a1%e6%9f%a5%e8%af%a2%e5%90%88%e5%b9%b6%e4%b8%ba%e5%8d%95%e6%9d%a1%e6%9f%a5%e8%af%a2%ef%bc%8c%e6%8f%90","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6740\/","title":{"rendered":"\u5982\u4f55\u5c06\u591a\u6761\u65e5\u671f\u533a\u95f4\u7edf\u8ba1\u67e5\u8be2\u5408\u5e76\u4e3a\u5355\u6761\u67e5\u8be2\uff0c\u63d0\u9ad8\u6548\u7387\u5e76\u7b80\u5316\u4ee3\u7801\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/172985331157000.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u5c06\u591a\u6761\u65e5\u671f\u533a\u95f4\u7edf\u8ba1\u67e5\u8be2\u5408\u5e76\u4e3a\u5355\u6761\u67e5\u8be2\uff0c\u63d0\u9ad8\u6548\u7387\u5e76\u7b80\u5316\u4ee3\u7801\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u5c06\u591a\u6761\u65e5\u671f\u533a\u95f4\u7edf\u8ba1\u67e5\u8be2\u5408\u5e76\u4e3a\u5355\u6761\u67e5\u8be2\uff0c\u63d0\u9ad8\u6548\u7387\u5e76\u7b80\u5316\u4ee3\u7801\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5408\u5e76\u591a\u6761\u67e5\u8be2\u4e3a\u5355\u6761\u67e5\u8be2<\/strong><\/p>\n<p>\u5728\u5904\u7406\u6570\u636e\u65f6\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u901a\u8fc7\u591a\u4e2a\u67e5\u8be2\u6765\u83b7\u53d6\u6240\u9700\u4fe1\u606f\u3002\u7136\u800c\uff0c\u5c06\u8fd9\u4e9b\u67e5\u8be2\u5408\u5e76\u4e3a\u5355\u6761\u67e5\u8be2\u53ef\u4ee5\u63d0\u9ad8\u6548\u7387\u5e76\u7b80\u5316\u4ee3\u7801\u3002<\/p>\n<p><strong>\u5408\u5e76\u4e09\u6761\u65e5\u671f\u533a\u95f4\u7edf\u8ba1\u67e5\u8be2<\/strong><\/p>\n<p>\u4ee5\u4e0b\u4e09\u6761\u67e5\u8be2\u5206\u522b\u7edf\u8ba1\u7ed9\u5b9a\u65e5\u671f\u8303\u56f4\u5185\u4e0d\u540c\u7684\u65e5\u671f\u7c92\u5ea6\u4e0b\u7684\u6570\u636e\u6570\u91cf\uff1a<\/p>\n<pre>select count(1) as flownum from ccform_debit_all where cf_acctime &gt; to_char(sysdate, 'yyyy-mm-dd');\nselect count(1) as flownummonth from ccform_debit_all where cf_acctime &gt; to_char(sysdate, 'yyyy-mm');\nselect count(1) as flownumtotal from ccform_debit_all where cf_acctime &gt; to_char(sysdate, 'yyyy');<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528 case \u8868\u8fbe\u5f0f\u5c06\u8fd9\u4e09\u6761\u67e5\u8be2\u5408\u5e76\u4e3a\u5355\u6761\u67e5\u8be2\u3002case \u8868\u8fbe\u5f0f\u6839\u636e cf_acctime \u5217\u4e0e\u4e0d\u540c\u65e5\u671f\u7c92\u5ea6\u7684\u6bd4\u8f83\u7ed3\u679c\uff0c\u751f\u6210\u76f8\u5e94\u7684\u7edf\u8ba1\u503c\uff1a<\/p>\n<pre>select count(case when to_char(cf_acctime, 'yyyy-MM-dd') &gt; to_char(sysdate, 'yyyy-MM-dd') then 1 end) as flowNum,\n       count(case when to_char(cf_acctime, 'yyyy-MM') &gt; to_char(sysdate, 'yyyy-MM') then 1 end)       as flowNumMonth,\n       count(case when to_char(cf_acctime, 'yyyy') &gt; to_char(sysdate, 'yyyy') then 1 end)             as flowNumTotal\nfrom ccform_debit_all<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u6267\u884c\u6b64\u67e5\u8be2\u5c06\u8fd4\u56de\u4e09\u4e2a\u7edf\u8ba1\u503c\uff1a\u5f53\u65e5\u3001\u5f53\u6708\u548c\u5f53\u5e74\u7684\u6570\u636e\u6570\u91cf\u3002\u8fd9\u79cd\u5408\u5e76\u540e\u7684\u67e5\u8be2\u63d0\u9ad8\u4e86\u6548\u7387\u5e76\u7b80\u5316\u4e86\u4ee3\u7801\uff0c\u4f7f\u6211\u4eec\u80fd\u591f\u4f7f\u7528\u5355\u6761\u67e5\u8be2\u83b7\u53d6\u6240\u6709\u6240\u9700\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u5c06\u591a\u6761\u65e5\u671f\u533a\u95f4\u7edf\u8ba1\u67e5\u8be2\u5408\u5e76\u4e3a\u5355\u6761\u67e5\u8be2\uff0c\u63d0\u9ad8\u6548\u7387\u5e76\u7b80\u5316\u4ee3\u7801\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5408\u5e76\u591a\u6761\u67e5\u8be2\u4e3a\u5355\u6761\u67e5\u8be2 \u5728\u5904\u7406\u6570\u636e\u65f6\uff0c\u6211\u4eec\u7ecf\u5e38\u9700\u8981\u901a\u8fc7\u591a\u4e2a\u67e5\u8be2\u6765\u83b7\u53d6\u6240\u9700\u4fe1\u606f\u3002\u7136\u800c\uff0c\u5c06\u8fd9\u4e9b\u67e5\u8be2\u5408\u5e76\u4e3a\u5355\u6761\u67e5\u8be2\u53ef\u4ee5\u63d0\u9ad8\u6548\u7387\u5e76\u7b80\u5316\u4ee3\u7801\u3002 \u5408\u5e76\u4e09\u6761\u65e5\u671f\u533a\u95f4\u7edf\u8ba1\u67e5\u8be2 \u4ee5\u4e0b\u4e09\u6761\u67e5\u8be2\u5206\u522b\u7edf\u8ba1\u7ed9\u5b9a\u65e5\u671f\u8303\u56f4\u5185\u4e0d\u540c\u7684\u65e5\u671f\u7c92\u5ea6\u4e0b\u7684\u6570\u636e\u6570\u91cf\uff1a select count(1) as flownum from ccform_debit_all where cf_acctime &gt; to_char(sysdate, &#8216;yyyy-mm-dd&#8217;); select count(1) as flownummonth from ccform_debit_all where cf_acctime &gt; to_char(sysdate, &#8216;yyyy-mm&#8217;); select count(1) as flownumtotal from ccform_debit_all where cf_acctime &gt; to_char(sysdate, &#8216;yyyy&#8217;); \u767b\u5f55\u540e\u590d\u5236 \u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528 case \u8868\u8fbe\u5f0f\u5c06\u8fd9\u4e09\u6761\u67e5\u8be2\u5408\u5e76\u4e3a\u5355\u6761\u67e5\u8be2\u3002case \u8868\u8fbe\u5f0f\u6839\u636e cf_acctime \u5217\u4e0e\u4e0d\u540c\u65e5\u671f\u7c92\u5ea6\u7684\u6bd4\u8f83\u7ed3\u679c\uff0c\u751f\u6210\u76f8\u5e94\u7684\u7edf\u8ba1\u503c\uff1a select count(case when to_char(cf_acctime, &#8216;yyyy-MM-dd&#8217;) &gt; to_char(sysdate, &#8216;yyyy-MM-dd&#8217;) then 1 end) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-6740","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=6740"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6740\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}