常见函数
1.GROUP BY
分组查询
GROUP BY
分组查询1.1分组前的筛选
where 语句放在group by 语句前
SELECT
AVG(id),
orderid
FROM
`pmw_goodstype`
GROUP BY orderid ;
1.2分组后的筛选
HAVING
关键字
Last updated
Was this helpful?
GROUP BY
分组查询where 语句放在group by 语句前
SELECT
AVG(id),
orderid
FROM
`pmw_goodstype`
GROUP BY orderid ;
HAVING
关键字
Last updated
Was this helpful?