|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
ASP.Net/C# - Quick select help, Group of a Group? SQL or LINQ
I am looking for the best solution with LINQ/C# or SQL
Select PID, ProjectName, UserName, Sum(Hours) From WorkLog For each project show each user and the sum of that user's time for the project. 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. |
|
#2
|
|||
|
|||
|
Quote:
Originally Posted by r937 Quote:
Oh yes, how simply silly of me. Thank you. |
![]() |
| Viewing: ASP Free Forums > Programming > .NET Development > ASP.Net/C# - Quick select help, Group of a Group? SQL or LINQ |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|