Javaweb-DQL-分组查询

1. select sex,avg(math) from stu group by sex;
2. select sex,avg(math),count(*) from stu group by sex;
3. select sex,avg(math),count(*) from stu where math>=70 group by sex;
4. select sex,avg(math),count(*) from stu where math>=70 group by sex having count(*) > 2;

posted @ 2024-09-07 14:46  wangyin0425  阅读(5)  评论(0编辑  收藏  举报