Calculating amount per

T

tankerman

I have a report that shows me all activity at our docks for a give time
frame, SQL is below. This report works just fine but now that we have had
this db for a year my manager wants me to

compare 2009 to 2008 in months and years totals, show each months amounts,
difference in number of handlings, as well difference by percentage and
yearly as well.

I can get the raw numbers by my query which I would need one for the 2008
month and then one for the year and same for 2009.

My question is how to combine all 4 into one report or is that possible.

SELECT Count(tblEventsDetails.ProductCode) AS CountOfProductCode,
tblEventsDetails.ProductCode, Count(tblEventsDetails.ActivityName) AS
CountOfActivityName, tblEventsDetails.ActivityName, tblDocks.DockCode
FROM tblDocks INNER JOIN tblEventsDetails ON tblDocks.DockCode =
tblEventsDetails.DockCode
WHERE (((tblEventsDetails.FinishTime) Between
[Forms]![frmEventsCalendar].[EStart] And [Forms]![frmEventsCalendar].[EEnd]))
GROUP BY tblEventsDetails.ProductCode, tblEventsDetails.ActivityName,
tblDocks.DockCode;
 
D

Duane Hookom

I'm not sure what's wrong with the web interface for the news groups but it
seems the Subject and replied to message body isn't included in replies.

I would probably create a crosstab query to report the various time periods.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top