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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Please Help! on SELECT Statement

Author  Topic 

ivra
Starting Member

18 Posts

Posted - 2009-03-13 : 09:57:07
Hi,
ListingInfo UserInfo
item_id user_id
Item_country country
seller_id email_addr
buyer_id good_status_yn
sold_yn accept_marketing_yn
gmv powerseller_yn
auct_end_date registration_date

*ListingInfo="Contains row for every item listed on the site. Buyer_id is null if item didn't sell. Buyer & Seller Id = User_id
The listinginfo joins to userinfo by seller_id or buyer_id"

*UserInfo=Contains row for every registered user

*Fields named _yn contain either Y or N

Question: How can I select list of sellers who have increased their GMV per month by at least 25% for the 3 months since registration. For example, Month 2 GMV must be more than a 25% increase on Month 1, and Month 3 must be more than a 25% increase on Month 2

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-13 : 11:28:25
Can you give CREATE table scripts, sample data, what you have tried so far?
Go to Top of Page

ivra
Starting Member

18 Posts

Posted - 2009-03-18 : 04:07:24
Sample data

UserInfo
user_id registration_date
S123--- 10/5/2007
S124--- 11/3/2007
S125--- 10/30/2007
S126--- 9/4/2007
S127--- 11/26/2007
S128--- 10/18/2007
S129--- 9/8/2007
S130--- 12/27/2007
S131--- 1/13/2008
S132--- 12/18/2007

ListingInfo

seller_id gmv
S123---- 64.79
S124---- 340.5
S125---- 320.45
S126---- 89.02
S127---- 434.7
S128---- 205.12
S129---- 870.52
S130---- 308.62
S131---- 1102.47
S132---- 859.53

I dont have any script yet.
Go to Top of Page

darkdusky
Aged Yak Warrior

591 Posts

Posted - 2009-03-19 : 06:08:15
If tables already exist: Right click on table: Script table as / Create To.
What have you tried so far?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-19 : 12:44:28
do you've month info in listing table to designate when seller got a particular gmv?
Go to Top of Page

ivra
Starting Member

18 Posts

Posted - 2009-03-24 : 04:33:01
quote:
Originally posted by visakh16

do you've month info in listing table to designate when seller got a particular gmv?



Hi visakh16,

Yes, the month info designate when the seller gmv.
eg: regdate of 10/5/2007 has gmv of 64.79

Go to Top of Page
   

- Advertisement -