I am using a query to total hours (Cltbudget.CBudhours) and dollars (CltBudget.CBudFee) Grouped by client names (Cltbudget.CBudCltName).
here is the Query:
SELECT CltBudget.CBudCltName AS Client
, SUM(CltBudget.CBudfee) AS 'Total Dollars'
, SUM(CltBudget.CBudhours) AS 'Total Hours'
FROM VPM.dbo.CltBudget CltBudget, CltDue
WHERE CltBudget.CBudDueID = CltDue.CDID AND ((CltDue.CDTarget Between '01-01-2007' And '12-31-2008')
AND (CltDue.CDStatus Not In ('Job Cancelled', 'Delivered', 'Job On Hold')
AND (CltDue.CDCltID Not In (1034,54,1404,1499))))
GROUP BY CltBudget.CBudCltName
ORDER BY CltBudget.CBudCltName
(CltDue.CDTarget) is the due date for the projects.
here is an example of the output:
Client name Total Dollars Total Hours
I am wanting to be able to Sum the hours for each month as well.
Client name Totaldollars Total Hours jan feb mar etc.
Any help is appreciated, thanks.