Database is widely used in business computing 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 powerful, simple-to-use, and widely-applied database computing script. Many other vendors also have introduced and launched some non-compatible solution, such as various stored procedure like PL-SQL®, T-SQL®, as well as esProc.

Here is a case as belows with SQL and esProc solutions.
A multinational retail enterprise needs to collect statistics on the newly opened retail store, including: How many new retail stores will open in this year? Of which how many companies have the sales over 1 million dollars? Among these companies with over-1-million sales, how many companies are abased overseas?

SQL Solution

SELECT COUNT(*) FROM stores WHERE to_char (openedTime, ‘yyyy’) = to_char (sysdate,’yyyy’);
SELECT COUNT(*) FROM stores WHERE to_char (openedTime, ‘yyyy’) = to_char (sysdate,’yyyy’) and profit>1000000;
SELECT COUNT(*) FROM stores WHERE to_char (openedTime, ‘yyyy’) = to_char (sysdate,’yyyy’) and profit>1000000 and nation<>’local’;

esProc solution
A B =A1.count()>1000000 =A2.count()!=’local’) =A3.count()

I think SQL is a little complex, and I'm not familiar with esProc, hope anyone can give a better solutions or tools for such computing problems.