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

mysql查詢 是分組,mysql中按照日期分組查詢數(shù)量

mysql查詢 是分組,mysql中按照日期分組查詢數(shù)量?

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;我沒有測(cè)試。time表示日期,amount表示數(shù)量。查詢11月后每天成交數(shù)量