SQL/MX 3.2.1 Query Guide (H06.26+, J06.15+)

SQL/MX Operators
HP NonStop SQL/MX Release 3.2.1 Query Guide663851-003
7-75
SORT_SCALAR_AGGR Operator
where int64_6 IN (0,2,4,5)
group by int64_6;
DESCRIPTION
fragment_id ............ 0
parent_frag ............ (none)
fragment_type .......... master
grouping_columns ....... DETCAT.DETSCH.PTAB09.INT64_6
aggregates .............. sum(count(1 ))
SORT_SCALAR_AGGR Operator
Groupby Group
The SORT_SCALAR_AGGR operator occurs for aggregates without a GROUP BY
clause. It returns one row. The description field for this operator contains the following:
The following is an example of the SORT_SCALAR_AGGR operator:
PREPARE TestQuery18 FROM
SELECT s_acctbal, s_name, n_name, p_partkey, p_mfgr, s_address,
s_phone, s_comment
FROM part,supplier,partsupp, nation, region
WHERE p_partkey = ps_partkey
AND s_suppkey = ps_suppkey
AND p_size = 15
AND p_type like '%BRASS'
AND s_nationkey = n_nationkey
AND n_regionkey = r_regionkey
AND r_name = 'EUROPE'
AND ps_supplycost = (SELECT MIN(ps_supplycost)
FROM partsupp ps1,supplier s1, nation n1,region r1
WHERE p_partkey = ps1.ps_partkey
AND s1.s_suppkey = ps1.ps_suppkey
AND s1.s_nationkey = n1.n_nationkey
AND n1.n_regionkey = r1.r_regionkey
AND r1.r_name = 'EUROPE')
ORDER BY s_acctbal desc, n_name, s_name, p_partkey;
Token Followed by... Data Type
fragment_id A sequential number assigned to the fragment.
0 is always the master executor and 1 is
reserved for the EXPLAIN plan. Numbers 2 to n
will be ESP or DAM fragments.
integer
parent_frag The fragment_id for the parent of the current
fragment. The value is (none) for the master
executor.
integer
fragment_type Master, ESP, or DP2. text
aggregates Expression of the aggregate function. expr(text)
selection_predicates Expression of the HAVING clause. expr(text)
TP663851.fm Page 75 Wednesday, January 30, 2013 5:37 PM