Neoview SQL Reference Manual (R2.4)

The result table of the TRANSPOSE query is:
COUNT(*)DVALCOLKEYCOL
1d111
1d1102
1d11003
1d221
1d2202
1d22003
This query shows how to use COUNT applied to VALCOL. The result table of the
TRANSPOSE query shows the number of distinct values in VALCOL.
SELECT COUNT(DISTINCT VALCOL) FROM mytable
TRANSPOSE A, B, C AS VALCOL
KEY BY KEYCOL
GROUP BY KEYCOL;
(EXPR)
--------------------
2
2
2
--- 3 row(s) selected.
This query shows how multiple TRANSPOSE clauses can be used in the same query. The
result table from this query has nine times as many rows as there are rows in MYTABLE:
SELECT KEYCOL1, VALCOL1, KEYCOL2, VALCOL2 FROM mytable
TRANSPOSE A, B, C AS VALCOL1
KEY BY KEYCOL1
TRANSPOSE D, E, F AS VALCOL2
KEY BY KEYCOL2;
The result table of the TRANSPOSE query is:
VALCOL2KEYCOL2VALCOL1KEYCOL1
d1111
e1211
f1311
d11102
e12102
f13102
d111003
e121003
f131003
d2121
e2221
f2321
d21202
e22202
TRANSPOSE Clause 313