- 0
- 0
- 约1.03万字
- 约 7页
- 2017-05-28 发布于河南
- 举报
esProc Simplifies SQL-style Computations – Data Grouping with Fixed Criteria
esProc Simplifies SQL-style Computations – Data Grouping with Fixed Criteria
During database application development, we often need to handle complicated SQL-style computations. Data grouping
with fixed criteria is just one type of these. It refers to the computation whose grouping criteria not come from the
to-be-grouped data, but from the outside, such as another table, the external parameters or a list of conditions. For the
operation of data grouping with fixed criteria in certain cases, like the one in which the grouping criteria are defined by
another table and no specific grouping order is required, it can be realized easily in SQL. But for the other cases, SQL
has difficulty in realizing the operation. esProc, however, provides easy solutions to various problems of this operation,
which will be illustrated through the following examples.
A table – sales - stores the records of orders, in which column CLIENT contains names of clients and column AMOUNT
contains order amounts. Now group the table according to the list of potential clients and sum up column AMOUNT of
each group. Some of the data of sales are displayed in the following figure:
OrderID Client SellerId Amount OrderDate
26 TAS 1 2142.4 2009/8/5
33 DSGC 1 613.2 2009/8/14
84 GC 1 88.5 2009/10/16
133 HU 1 1419.8 2010/12/12
32 JFS 3 468 2009/8/13
39 NR 3 3016 2010/8/21
43 KT 3 2169 2009/8/27
原创力文档

文档评论(0)