MySQL数据组装,根据前端传入当前年月往前推12月,当月有数据带着数据,若当月无数据,赋值0
摘要:
SELECTa.*FROM(SELECTdate_format( created_time, '%Y-%m' ) AS cmonth,count( `created_time` ) AS totalQuantityFROM`tb_ter_terminal`GROUP BYcmonthHAVINGcm 阅读全文
posted @ 2023-02-24 10:28 W雨文 阅读(26) 评论(0) 推荐(0) 编辑