最近刚学sqlserver,有个地方没搞明白有张表,数据结构如下:
这跟树形有什么关系,不就是按照大区group by一下就出来了select pid,id,sum(value) from table group by pid,id