You can also input multiple columns in the TargetColumns parameter to have these statistics calculated for all those columns at the same time. If you want stats for all columns, a shorter way to do this would be to add [:] in the TargetColumns parameter.
titanic2: Input Table
The following input table is used for these examples.
passenger |
p_class |
survived |
fare |
height_cms |
5 |
3 |
0 |
8.10 |
137.90 |
3 |
3 |
1 |
7.90 |
155.10 |
4 |
1 |
1 |
53.10 |
130.70 |
1 |
3 |
0 |
7.30 |
145.30 |
2 |
1 |
1 |
71.30 |
134.70 |
Multiple Columns SQL Call
SELECT * FROM TD_RoundColumns (
ON titanic2 AS InputTable
USING
TargetColumns ('fare','height_cms')
PrecisionDigit (1)
Accumulate ('[0:1]','survived')
) AS dt;
Multiple Columns Output
passenger |
p_class |
survived |
fare |
height_cms |
5 |
3 |
0 |
8.10 |
137.90 |
3 |
3 |
1 |
7.90 |
155.10 |
4 |
1 |
1 |
53.10 |
130.70 |
1 |
3 |
0 |
7.30 |
145.30 |
2 |
1 |
1 |
71.30 |
134.70 |
All Columns SQL Call
SELECT * FROM TD_RoundColumns (
ON titanic2 AS InputTable
USING
TargetColumns ('[:]')
PrecisionDigit (1)
) AS dt;
All Columns Output
passenger |
p_class |
fare |
height_cms |
survived |
5 |
3 |
8.10 |
137.90 |
0 |
3 |
3 |
7.90 |
155.10 |
1 |
4 |
1 |
53.10 |
130.70 |
1 |
1 |
3 |
7.30 |
145.30 |
0 |
2 |
1 |
71.30 |
134.70 |
1 |