SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

datakeyword
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?

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3383 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

garyjohn
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  
 New 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.09 seconds. Powered By: Snitz Forums 2000