order by having group by

1.group by 和having 的使用

SELECT *, count(`sku_quantity`)  as quantity FROM products  group by sku  having quantity>2   //这条语句就可以排除重复的订单。

posted @ 2015-01-05 09:56  KOBE-Jason  阅读(130)  评论(0编辑  收藏  举报