How do I calculate totals in a query



I have the following query. I have formated [Prod Date] as "ww" to give me a
week number. I then want to get the sum of [Shop Hrs] for every particulare
"ww". Attached is the sql view. Any help is appreciated.


SELECT [Zee's Schedule + Capacity Known QUERY Query The Real Deal].[Line #],
[Zee's Schedule + Capacity Known QUERY Query The Real Deal].Job, [Zee's
Schedule + Capacity Known QUERY Query The Real Deal].PM, [Zee's Schedule +
Capacity Known QUERY Query The Real Deal].Detailer, [Zee's Schedule +
Capacity Known QUERY Query The Real Deal].[Drawing No], [Zee's Schedule +
Capacity Known QUERY Query The Real Deal].Description, [Zee's Schedule +
Capacity Known QUERY Query The Real Deal].[Detail Hrs], [Zee's Schedule +
Capacity Known QUERY Query The Real Deal].TNM, [Zee's Schedule + Capacity
Known QUERY Query The Real Deal].[Shop Hrs], [Zee's Schedule + Capacity Known
QUERY Query The Real Deal].[Inst Hrs], [Zee's Schedule + Capacity Known QUERY
Query The Real Deal].[No Shop Req], [Zee's Schedule + Capacity Known QUERY
Query The Real Deal].[PM/Detail Notes], [Zee's Schedule + Capacity Known
QUERY Query The Real Deal].[Cust/Design Hold], [Zee's Schedule + Capacity
Known QUERY Query The Real Deal].[1st Sub], [Zee's Schedule + Capacity Known
QUERY Query The Real Deal].[1st Sub A], [Zee's Schedule + Capacity Known
QUERY Query The Real Deal].[1st Sub C], [Zee's Schedule + Capacity Known
QUERY Query The Real Deal].[1st Ret], [Zee's Schedule + Capacity Known QUERY
Query The Real Deal].[1st Ret A], [Zee's Schedule + Capacity Known QUERY
Query The Real Deal].[1st Ret C], [Zee's Schedule + Capacity Known QUERY
Query The Real Deal].[2nd Sub], [Zee's Schedule + Capacity Known QUERY Query
The Real Deal].[2nd Sub A], [Zee's Schedule + Capacity Known QUERY Query The
Real Deal].[2nd Sub C], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[2nd Ret], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[2nd Ret A], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[2nd Ret C], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Field Dim], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Field Dim A], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Field Dim C], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Shop Description], [Zee's Schedule + Capacity Known QUERY Query The
Real Deal].[To S/B Date], [Zee's Schedule + Capacity Known QUERY Query The
Real Deal].[To S/B], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[To Shop Date], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[To Shop], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Production Notes], [Zee's Schedule + Capacity Known QUERY Query The
Real Deal].Core, [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Core C], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].Ven, [Zee's Schedule + Capacity Known QUERY Query The Real Deal].[Ven
C], [Zee's Schedule + Capacity Known QUERY Query The Real Deal].VHrs, [Zee's
Schedule + Capacity Known QUERY Query The Real Deal].Mach, [Zee's Schedule +
Capacity Known QUERY Query The Real Deal].[Mach C], [Zee's Schedule +
Capacity Known QUERY Query The Real Deal].MHrs, [Zee's Schedule + Capacity
Known QUERY Query The Real Deal].Cabinet, [Zee's Schedule + Capacity Known
QUERY Query The Real Deal].[Cab C], [Zee's Schedule + Capacity Known QUERY
Query The Real Deal].CHRS, [Zee's Schedule + Capacity Known QUERY Query The
Real Deal].Finish, [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Finish C], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].FHrs, [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].Upfit, [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Upfit C], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].Metal, [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Metal C], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].MeHrs, [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].Shipped, [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Prod Date], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Thru-Put], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Ship Date], [Zee's Schedule + Capacity Known QUERY Query The Real
Deal].[Cycle Time]
FROM [Zee's Schedule + Capacity Known QUERY Query The Real Deal]
GROUP BY [Zee's Schedule + Capacity Known QUERY Query The Real Deal].[Prod
Date]
ORDER BY [Zee's Schedule + Capacity Known QUERY Query The Real Deal].[Shop
Hrs];

.



Relevant Pages

  • Re: Can I do this Query?
    ... The capacity will never exceed 1 for any item. ... Can I get the query to return this information? ... SELECT Orderid,MAX(Line)Line FROM #Test GROUP BY Orderid ...
    (microsoft.public.sqlserver.server)
  • Re: Can I do this Query?
    ... Andrew and Uri ... Order No Line No Box Capacity ... Can I get the query to return this information? ... SELECT Orderid,MAXLine FROM #Test GROUP BY Orderid ...
    (microsoft.public.sqlserver.server)
  • RE: How do I calculate totals in a query
    ... the easiest way to sum in queries is to build a separate little ... query just to sum and then add it back in to the main query. ... Capacity Known QUERY Query The Real Deal].Description, [Zee's Schedule + ...
    (microsoft.public.access.queries)
  • RE: Tricky Calculation Question
    ... Capacity, CapStartDate, and CapEndDate. ... Then you create a query that contains the census values and this Capacity ... I do utilization reports where I divide their capacity by their census and ...
    (microsoft.public.access.queries)
  • Re: CQWP and ME
    ... the query will actually provide as a radio button after I filter by Assigned To. ... Additional performance and capacity planning factors (Office SharePoint ...
    (microsoft.public.sharepoint.portalserver)