Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sum in a query disregarding dates 1

Status
Not open for further replies.

Kikk0

IS-IT--Management
Jul 29, 2008
7
0
0
CA
Hello everyone.

I have a query that gives me the following results:

[tt]Name SkillUsed TimeUsed Date[/tt]
[tt]Name 1 Skill1 20 8/1/2008[/tt]
[tt]Name 1 Skill1 20 8/2/2008[/tt]
[tt]Name 1 Skill2 10 8/6/2008[/tt]
[tt]Name 1 Skill2 20 8/5/2008[/tt]
[tt]Name 1 Skill1 20 8/4/2008[/tt]

[Name] is based on a criteria and [Date] is based on a criteria as well (need the date range - from-to).

I would like for this query to give me the totals of TimeUsed based on [SkillUsed] ignoring the Dates...

Something like this

[tt]Name SkillUsed TimeUsed[/tt]
[tt]Name 1 Skill1 60[/tt]
[tt]Name 1 Skill2 30[/tt]

Any suggestion on how to achieve this would be really appreciated.

Thank you in advance.
 
SELECT Name, SkillUsed, Sum(TimeUsed) AS TotalTime
FROM yourQuery
GROUP BY Name, SkillUsed

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV... that works very well
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top