因此在附属单元格中,需要对该组集进行操作时,不需要用任何条件和主单元格关联了,如果加设了条件,反倒画蛇添足,导致报表引擎还对组集中的记录进行遍历检索。
正确的group 用法:
不合理的group用法:
group函数的原理图示:
group by 语句用于结合合计函数,根据一个或多个列对结果集进行分组。
sql group by 语法
select column_name, aggregate_function(column_name)
from table_name
where column_name operator value
group by column_name
group by 一个以上的列
我们也可以对一个以上的列应用 group by 语句,就像这样:
select customer,orderdate,sum(orderprice) from orders
group by customer,orderdate
Copyright © 2019- tachun.com.cn 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务