Group by 不能用select * 语句
Having 放在group by的后面.
Select xx ,xx from 表名 where group by xx.xx having order by 表名 desc/asc;
Count(*) count()
SELECT * FROM studentinfo GROUP BY city HAVING AVG(age)>20 LIMIT 1;
Group by 不能用select * 语句
Having 放在group by的后面.
Select xx ,xx from 表名 where group by xx.xx having order by 表名 desc/asc;
Count(*) count()
SELECT * FROM studentinfo GROUP BY city HAVING AVG(age)>20 LIMIT 1;