Mysql Sum()与 HAVING函数使用
统计用户的消费情况:select user_id,SUM(gold_use),user_name from t_log_use_gold where mtime between 1350144000 and 1350230399 group by user_id HAVING SUM(gold_use)>='200' into outfile "/tmp/2012-10-14.tx
原创
2012-10-15 21:39:52 ·
2703 阅读 ·
0 评论