色婷婷狠狠18禁久久YY,CHINESE性内射高清国产,国产女人18毛片水真多1,国产AV在线观看

mysql分組查詢sql,mysql中按照日期分組查詢數量

張吉惟2年前24瀏覽0評論
mysql分組查詢sql,mysql中按照日期分組查詢數量?

SELECT DATE_FORMAT(time,'%Y-%m-%d') as day, sum(case when amount>0 then amount when amount=0 then 0 end) as amount1from table where time>='2014-11-01' group by day;我沒有測試。time表示日期,amount表示數量。查詢11月后每天成交數量