Syntax Agility Comparison: R Language vs. esProc

By definition the true agile syntax only requires users to memorize a small number of basic functions to implement a great many of advanced functions through simple processing on the basic functions. The said simple processing is a programming style of lightweight effort that is far easier and simpler to grasp than the common programming. [...]

Grouping Function Comparison: R Language vs. esProc

Recently, I participated in the analysis for several marketing questionnaires in a row. Various typical grouping issues are encountered during the process. To share with the interested fellow in the same business, I classified and summarized these issues. Grouping is to allocate the samples into several groups according to a specific flag. There is a [...]

Implement Basic Functions of SQL: R Language vs. esProc

As we know, SQL users have to finish composing all codes and then run them all at one time, resulting in a poor ability to interact. However, the simple and easy-to-understand query syntax of SQL is always welcomed by programmers. R and esProc as the computation and analysis tool are surely required to offer the [...]

esProc Scripts Overperform R Language in Business Computing

The computing in business activities involves enterprise reporting (Reporting), business data integration and cleaning (Data Integration and ETL), OLAP (Online Analysis Process), ERP (Enterprise Resource Planning), CRM (Customer Relationship Management), SCM (Supply Chain Management), and DSS (Decision Support System). Unlike the scientific computing, business computing has its own characteristics: Focus on the structural data in [...]

The More Powerful Database Computing Scripts

Database plays an irreplaceable role in the modern economy and is widely used in the business computing areas like Enterprise Resources Planning (ERP), Customer Relation Management (CRM), Supply Chain Management (SCM), and the Decision Support System (DSS). Computation on the structured data in the database mainly relies on SQL (Structured Query Language). SQL is the [...]

Top 3 Salespersons by Monthly Sales: R Language vs. esProc

Both R language and esProc have the outstanding ability to perform the stepwise computations. However, in the particulars they differ from each other. To demonstrate the difference, a case 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 [...]

Completing the result set step by step

Select two employees (one male and the other female) from each department as a pair to play games. WITH A AS (SELECT name,dept, row_number() OVER(PARTITION BY dept ORDER BY 1) sequence_no FROM employee WHERE gender=’male’), B AS (SELECT name,dept, row_number() OVER(PARTITION BY dept ORDER BY 1) sequence_no FROM employee WHERE gender=’female’) SELECT name,dept FROM A [...]

Grouping the subtable

List the names of the employees and count the cities where each employee has worked for over one year. SELECT name,count(*) city_total FROM (SELECT name, city FROM employee,resume WHERE GROUP BY name,city HAVING sum(work_days)>=365) GROUP BY name Process the subtable through the multi-table join. The grouped result set has the same number of [...]

Querying the subtable

Find out the first companies that the employees worked for. Multi-table join SELECT name,company first_company FROM (SELECT name, company, row_number() OVER(PARTITION BY ORDER BY resume.start_date) work_order FROM employee,resume WHERE WHERE work_order=1 The subquery SELECT name, (SELECT company FROM resume WHERE AND start_date=(SELECT min(start_date) FROM resume WHERE first_company FROM employee A [...]

Reference of the records associated by foreign key

Find out the male employees under the female managers. Multi-table join: SELECT A.* FROM employee A,dept B,employee C WHERE A.dept=B.dept AND AND A.gender=’male’ AND C.gender=’female’ The subquery: SELECT * FROM employee WHERE gender=’male’ and dept in (SELECT dept FROM dept_table WHERE manager IN (SELECT name FROM employee WHERE gender=’female’)) Lacking a record referencing mechanism, [...]