Select PID, ProjectName, UserName, Sum(Hours)
From WorkLog
WorkLog:
PID | projectName | UserName | HourS |
----------------------------------------
1 | Fist Project | Joe User | 2 |
1 | Fist Project | Joe User | 1 |
1 | Fist Project | BOB Cool | 2 |
2 | Second Proj | Joe User | 1 |
2 | Second Proj | Joe User | 3 |
1 | Fist Project | BOB Cool | 2 |
I am trying to produce this result:
PID | projectName | UserName | SUM of HourS |
-------------------------------------------------
1 | Fist Project | Joe User | 3 |
1 | Fist Project | BOB Cool | 5 |
2 | Second Proj | Joe User | 4 |
Thank you for your time. I am sure this is easy, but I am new. I promise I have looked for this answer before posting this new question.
From WorkLog
WorkLog:
PID | projectName | UserName | HourS |
----------------------------------------
1 | Fist Project | Joe User | 2 |
1 | Fist Project | Joe User | 1 |
1 | Fist Project | BOB Cool | 2 |
2 | Second Proj | Joe User | 1 |
2 | Second Proj | Joe User | 3 |
1 | Fist Project | BOB Cool | 2 |
I am trying to produce this result:
PID | projectName | UserName | SUM of HourS |
-------------------------------------------------
1 | Fist Project | Joe User | 3 |
1 | Fist Project | BOB Cool | 5 |
2 | Second Proj | Joe User | 4 |
Thank you for your time. I am sure this is easy, but I am new. I promise I have looked for this answer before posting this new question.