Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Script Library
 Percentage calculation help

Author  Topic 

Nedriguez
Starting Member

2 Posts

Posted - 2010-02-04 : 08:57:55
Hi,
How would you select data that shows a 25% increase month on month?

For example get the followoing results:
List of merchants who have increased their sales per month by at least 25% for the 3 months since activation. For example, Month 2 sales must be more than a 25% increase on Month 1, and Month 3 must be more than a 25% increase on Month 2

querying 2 tables:
note: you can link merchant_id in listinginfo to user_id
in MerchInfo.

ListingInfo MerchInfo

item_id user_id
Item_country country
Merchant_id email_addr
sales_amt activation_date



Nedriguez

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-04 : 09:02:46
are you using sql 2005?

also dont post questions here in future
this is script library intended for working scripts
Go to Top of Page

Nedriguez
Starting Member

2 Posts

Posted - 2010-02-04 : 09:17:18
quote:
Originally posted by visakh16

are you using sql 2005?

also dont post questions here in future
this is script library intended for working scripts


yes 2005 appologies this is the first time using this forum.

Nedriguez
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-04 : 09:24:12
can you post some data in below format?

http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page
   

- Advertisement -