Mysql Group by week

SELECT SUM(`amount_sale`)as total 
FROM`sales`WHERE`payment_type`='Account'GROUPBY WEEK(FROM_UNIXTIME(`the_date`))

ref stackoverflow
posted @ 2014-05-16 11:34  star4knight  阅读(432)  评论(0编辑  收藏  举报