I am using a query to total hours (Cltbudget.CBud hours) and dollars (CltBudget.CBud Fee) Grouped by client names (Cltbudget.CBud CltName).
here is the Query:
SELECT CltBudget.CBudC ltName AS Client
, SUM(CltBudget.C Budfee) AS 'Total Dollars'
, SUM(CltBudget.C Budhours) AS 'Total Hours'
FROM VPM.dbo.CltBudg et CltBudget, CltDue
WHERE CltBudget.CBudD ueID = CltDue.CDID AND ((CltDue.CDTarg et Between '01-01-2007' And '12-31-2008')
AND (CltDue.CDStatu s Not In ('Job Cancelled', 'Delivered', 'Job On Hold')
AND (CltDue.CDCltID Not In (1034,54,1404,1 499))))
GROUP BY CltBudget.CBudC ltName
ORDER BY CltBudget.CBudC ltName
(CltDue.CDTarge t) 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.
here is the Query:
SELECT CltBudget.CBudC ltName AS Client
, SUM(CltBudget.C Budfee) AS 'Total Dollars'
, SUM(CltBudget.C Budhours) AS 'Total Hours'
FROM VPM.dbo.CltBudg et CltBudget, CltDue
WHERE CltBudget.CBudD ueID = CltDue.CDID AND ((CltDue.CDTarg et Between '01-01-2007' And '12-31-2008')
AND (CltDue.CDStatu s Not In ('Job Cancelled', 'Delivered', 'Job On Hold')
AND (CltDue.CDCltID Not In (1034,54,1404,1 499))))
GROUP BY CltBudget.CBudC ltName
ORDER BY CltBudget.CBudC ltName
(CltDue.CDTarge t) 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.
Comment