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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 Development Tools
 Other Development Tools
 How to find outtop 3 salespersons by monthly sales
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

10 Posts

Posted - 10/24/2012 :  03:11:23  Show Profile  Reply with Quote
Hi, all,

if i have two data file with monthly sales, how can i find out the top 3 salespersons quickly? I search for google and find a post, it is by R and another tool esProc, but i still don't know exactly how to do? anyone other solutions?

Flowing Fount of Yak Knowledge

United Kingdom
3385 Posts

Posted - 10/24/2012 :  04:09:15  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
I would import them into sql server then run a query - what do you have available and what is the structure of the files.
You could maybe use an xml app.

I suspect that this isn't all you will want to do with the data so you should think about longer term design.

Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Starting Member

7 Posts

Posted - 02/28/2013 :  02:00:26  Show Profile  Reply with Quote
Group by salesman in the Contract table to calculate the total sales amount of each salesman. Select the top 3 salesman by their total sales amount. Group the record group by "product" category and compute the total sales amount of each group, ie, the total sales amount of each product category. And then sort and get a result.

Just for a reference of esProc, R is also very easy, but there is still a little different from esProc.

These two tools are good choice for those who don't have very high SQL knowledge.But for SQL users, they are also much easier and more convenient, I think.

business analyst, marketing director
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000