Top 3 Salespersons By Monthly Sales: R Language V.s Esproc
Top 3 Salespersons by Monthly Sales: R Language v.s esProc
Both
R language and
esProc have the outstanding ability to perform the step by step computations. And they are great tools for statistical computing. However, in the particulars they differ from each other. To demonstrate the difference, a case for statistical computing is designed as follows:
A company' s Sales department wants to select out the outstanding salespersons through statistics, that is, the salespersons whose sales amounts are always among the top 3 in each month from the January this year to the previous year. The data is mainly from the order table of database: salesOrder, and the main fields include the ID of order: ordered, name of salesperson: name, sales amount: sales, and date of order: salesDate.
The solution is like this substantially:
Compute the beginning dates of this year and this month, and filter the data by date.
Group by month and salesperson, and compute the sales amount of each salesperson in each month.
Group by month, and compute the rankings of sales amount in each group.
Filter out the top 3 salespersons from each group.
Compute the set of intersections of each group, that is, salespersons always among the top 3 in each month.
The solution of R language is shown as below:
01 library(RODBC)
02 odbcDataSources()
03 conn
by: Datakeyword
Learning Almost Any Language Rosetta Stone The Spanish Language Assessment Learning A Foreign Language From Scratch Is So Easy With Inlingua Foreign Language Courses The Top Benefits Of Using The Rosetta Stone Japanese Language Course Php As A Custom Programming Language Translator Has The Same In-depth Knowledge About The Re-encode The Meaning In The Target Language. Language Acquisition Process English Language A Way To Success In Today World Language Translation Services Removing Communication Barriers The Importance Of The Alpha Body Language Advantages Of Taking A Russian Language Course Today Using Immersion Russian To Study The Language Want To Learn Foreign Language Well?
www.yloan.com
guest:
register
|
login
|
search
IP(216.73.216.142) California / Anaheim
Processed in 0.028106 second(s), 7 queries
,
Gzip enabled
, discuz 5.5 through PHP 8.3.9 ,
debug code: 26 , 1658, 121,