Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Guran
Starting Member
17 Posts |
Posted - 2005-06-02 : 17:07:02
|
| Is it possible to have two SUM's in the same SQL-statement, both of them summing the same column but they sum the in different ways.Right now I do something like SELECT Clients.Name, SUM(TimeReports.Hours). By using a parameter under the WHERE part I can select Hours that are of one type. But I would like to get two sums. One of the hours that is part of type one and one that is part of type two. Like I said, getting one of them is no problem. The problem is getting both of them in the same statement.Is it possible? |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|