在sql中使用Excel公式

问题描述 投票:0回答:1

我有以下数据表:

enter image description here

我想创建此表的摘要,如下所示:

enter image description here

我可以通过sumifs在excel中执行此操作,但不知道如何在sql中执行相同/类似的结果。

谁能指出我正确的方向?

sql formula
1个回答
0
投票

使用group by子句,例如:

select Department, sum(Basic_Time) from table group by Department
© www.soinside.com 2019 - 2024. All rights reserved.