Multiple Groupings Example; Grand Total Example - Omron CX-SUPERVISOR - V2.0 User Manual

Table of Contents

Advertisement

OMRON
SUM(rsDetails.ExtendedPrice) AS OrderTotal) AS rsOrders
COMPUTE
BY
customerid
Note:

Multiple Groupings example:

SHAPE
(SHAPE
on customers.customerid = orders.customerid) inner join
COMPUTE rsCustSummary
BY

Grand Total example:

SHAPE
(SHAPE
od.unitprice * od.quantity as ExtendedPrice from (customers inner
join orders on customers.customerid = orders.customerid) inner
join
COMPUTE ANY(rsDetail.contactname) AS Contact,
COMPUTE SUM(rsCustSummary.CustTotal) As GrandTotal,
Release 2.0
rsOrders,
SUM(rsOrders.OrderTotal) AS CustTotal,
ANY(rsOrders.contactname) AS Contact
The inner SHAPE clause in this example is identical to the statement used in the
Hierarchy with Aggregate example.
{select customers.*,
od.unitprice * od.quantity as ExtendedPrice from (customers
inner join orders
[order details] as od on orders.orderid = od.orderid}
AS rsDetail
COMPUTE ANY(rsDetail.contactname) AS Contact,
ANY(rsDetail.region) AS Region,
SUM(rsDetail.ExtendedPrice) AS CustTotal,
rsDetail
BY customerid) AS rsCustSummary
Region
{select customers.*,
[order details] as od on orders.orderid = od.orderid}
AS rsDetail
SUM(rsDetail.ExtendedPrice) AS CustTotal,
rsDetail
BY customerid) AS rsCustSummary
rsCustSummary
CHAPTER 12 – Databases
Page 215

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-supervisor 2.0

Table of Contents