GROUP BY
where 语句放在group by 语句前
SELECT AVG(id), orderid FROM `pmw_goodstype` GROUP BY orderid ;
HAVING关键字
HAVING
Last updated 4 years ago