>I guess the simplest way to do this, assuming you can weed out the holidays, 
>would be to just run a query that gets all the product sales over the last 5 
>days, ordered by productID, then SalesDate. Loop over the results tracking 
>the product id and the numSales for each day. If the product matches all the 
>criteria (i.e. each subsequent days sales are greater than the previous), 
>add it to your list of products to return.
>
>This can be troublesome if you are dealing with a huge record set.
>
>
>> Want to also mention that that I'm..err I mean the DBA is avoiding 
>> creating a new table and running a nightly batch query that inserts 
>> products with a trend because backtesting is important.
>>

What about trying to calculate the number of days sales growth occured?  I'm 
trying to avoid looping around everything because the answer isn't explicit.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Protect Your PC from viruses, hackers, spam and more. Buy PC-cillin with Easy 
Installation & Support 
http://www.houseoffusion.com/banners/view.cfm?bannerid=61

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:149679
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to