{"id":73,"date":"2024-09-18T11:00:27","date_gmt":"2024-09-18T03:00:27","guid":{"rendered":"https:\/\/a.li6.cc\/?p=73"},"modified":"2024-09-18T11:00:27","modified_gmt":"2024-09-18T03:00:27","slug":"mysql%e6%8c%89%e6%9c%88%e3%80%81%e5%91%a8%e3%80%81%e5%a4%a9%e5%88%86%e7%bb%84%e6%9f%a5%e8%af%a2%e6%95%b0%e6%8d%ae%ef%bc%8c%e5%8e%9f%e5%a7%8b%e6%95%b0%e6%8d%ae%e6%98%af%e6%97%b6%e9%97%b4%e6%88%b3","status":"publish","type":"post","link":"https:\/\/a.li6.cc\/index.php\/2024\/09\/18\/mysql%e6%8c%89%e6%9c%88%e3%80%81%e5%91%a8%e3%80%81%e5%a4%a9%e5%88%86%e7%bb%84%e6%9f%a5%e8%af%a2%e6%95%b0%e6%8d%ae%ef%bc%8c%e5%8e%9f%e5%a7%8b%e6%95%b0%e6%8d%ae%e6%98%af%e6%97%b6%e9%97%b4%e6%88%b3\/","title":{"rendered":"mysql\u6309\u6708\u3001\u5468\u3001\u5929\u5206\u7ec4\u67e5\u8be2\u6570\u636e\uff0c\u539f\u59cb\u6570\u636e\u662f\u65f6\u95f4\u6233"},"content":{"rendered":"<p>\u5982\u679c\u76f4\u63a5\u67e5\u8be2\u5355\u6761\u6570\u636e\u51fa\u6765 \u662f\u4f1a\u5361\u7206\u5185\u5b58\u7684\u3002\u6240\u4ee5\u8981\u5728mysql\u5185\u90e8\u5206\u597d\u7ec4\u3002<br \/>\n\u5b57\u6bb5upload_time\u662f\u65e5\u671f\u683c\u5f0f\u65f6\uff1a<\/p>\n<pre><code>select DATE_FORMAT(upload_time,&#039;%Y%u&#039;) weeks,count(SN_ID) count from table_sn group by weeks;  -- \u6309\u7167\u5468\u5206\u7ec4\nselect DATE_FORMAT(upload_time,&#039;%Y%m%d&#039;) days,count(SN_ID) count from table_sn group by days;  -- \u6309\u7167\u65e5\u5206\u7ec4 \nselect DATE_FORMAT(upload_time,&#039;%Y%m&#039;) months,count(SN_ID) count from table_sn group by months;  -- \u6309\u7167\u6708\u5206\u7ec4<\/code><\/pre>\n<p>\u5b57\u6bb5upload_time\u662f\u65f6\u95f4\u6233\u6570\u5b57\u683c\u5f0f\u65f6\uff1a<\/p>\n<pre><code>select DATE_FORMAT(FROM_UNIXTIM(upload_time),&#039;%Y%u&#039;) weeks,count(SN_ID) count from table_sn group by weeks;  -- \u6309\u7167\u5468\u5206\u7ec4\nselect DATE_FORMAT(FROM_UNIXTIM(upload_time),&#039;%Y%m%d&#039;) days,count(SN_ID) count from table_sn group by days;  -- \u6309\u7167\u65e5\u5206\u7ec4 \nselect DATE_FORMAT(FROM_UNIXTIM(upload_time),&#039;%Y%m&#039;) months,count(SN_ID) count from table_sn group by months;  -- \u6309\u7167\u6708\u5206\u7ec4<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u76f4\u63a5\u67e5\u8be2\u5355\u6761\u6570\u636e\u51fa\u6765 \u662f\u4f1a\u5361\u7206\u5185\u5b58\u7684\u3002\u6240\u4ee5\u8981\u5728mysql\u5185\u90e8\u5206\u597d\u7ec4\u3002 \u5b57\u6bb5u &hellip; <a href=\"https:\/\/a.li6.cc\/index.php\/2024\/09\/18\/mysql%e6%8c%89%e6%9c%88%e3%80%81%e5%91%a8%e3%80%81%e5%a4%a9%e5%88%86%e7%bb%84%e6%9f%a5%e8%af%a2%e6%95%b0%e6%8d%ae%ef%bc%8c%e5%8e%9f%e5%a7%8b%e6%95%b0%e6%8d%ae%e6%98%af%e6%97%b6%e9%97%b4%e6%88%b3\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/73"}],"collection":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":1,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":74,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/posts\/73\/revisions\/74"}],"wp:attachment":[{"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/a.li6.cc\/index.php\/wp-json\/wp\/v2\/tags?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}