Connecting Tech Pros Worldwide Help | Site Map

Show Month over Month Declining Sales

  #1  
Old November 13th, 2005, 06:22 AM
laurenq uantrell
Guest
 
Posts: n/a
I am trying to construct a query that sums sales by salespersons and
only returns a list of salespersons that have a sum of sales lower than
the previous month for whatever date rane is selected.
For example, if the user selects a date range of Sept.1 ,2004 thru Dec.
31, 2004 the query will return only salespersons where October was
worse than September and November was worse than october and December
was worse than November...

Is ths possible?

The basic query is:

SELECT Contacts.UniqueID, Contacts.LastName, Sum(Sales.Amount) AS
SumOfAmount
FROM Contacts LEFT JOIN Sales ON Contacts.UniqueID = Sales.UniqueID
WHERE (((Sales.SaleDate) Between [Enter a Starting Date:] And [Enter an
Ending Date:]))
GROUP BY Contacts.UniqueID, Contacts.LastName;

  #2  
Old November 13th, 2005, 06:24 AM
Bas Cost Budde
Guest
 
Posts: n/a

re: Show Month over Month Declining Sales


laurenq uantrell wrote:

answer in your later post

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
Millionare at 31 on the internet listen to how he is doing Donnie Barnes answers 0 December 30th, 2006 12:45 PM
wxPython Licence vs GPL John Perks and Sarah Mount answers 84 November 30th, 2005 02:55 AM