当前位置:首页>开发>正文

Oracle的查询语句Groupby的使用

2023-04-29 01:29:45 互联网 未知 开发

Oracle的查询语句Groupby的使用?

Oracle的查询语句Groupby的使用

实际上题目考察的就是分组。通过group by进行分组后,可以通过sum进行求和,count进行数值计算。sql:select username ,count(accountNo) as count,sum(amount) as amount from tablename group by username以上就可以求出username下,accountNo的条数和对应的总amount。

最新文章