Every complete example in this document is available in a zip file that you can download. The zip file includes a SQL script file that creates the input tables for the examples. If you are reading this document on https://docs.teradata.com/, you can download the zip file from the attachment in the left sidebar.
TD_ColumnSummary InputTable: col_titanic_train
passenger survived pclass name gender age sibsp parch ticket fare cabin embarked --------- -------- ------ ------------------------------------ ------ ---- ----- ----- ------ ---- ----- -------- 49 0 3 Samaan; Mr. Youssef male null 2 0 2662 21.679 null C 78 0 3 Moutal; Mr. Rahamin Haim male null 0 0 374746 8.05 null S 505 1 1 Maioni; Miss. Roberta female 16 0 0 110152 8.65 B79 S 631 1 1 Barkworth; Mr. Algernon Henry Wilson male 80 0 0 27042 30 A23 S 873 0 1 Carlsson; Mr. Frans Olof male 33 0 0 695 5 B51 B53 B55 S
Example: Using Column Names in TD_ColumnSummary Call
SELECT * FROM TD_ColumnSummary ( ON col_titanic_train AS InputTable USING TargetColumns ('age','pclass','embarked','cabin') ) AS dt;
Example: Using Column Range in TD_ColumnSummary Call
SELECT * FROM TD_ColumnSummary ( ON col_titanic_train AS InputTable USING TargetColumns ('[10:11]') ) AS dt;
TD_ColumnSummary Output
ColumnName Datatype NonNullCount NullCount BlankCount ZeroCount PositiveCount NegativeCount NullPercentage NonNullPercentage --------- ------------- ------------- -------------- -----------------
age INTEGER 3 2 null 0 3 0 4.00E+001 6.00E+001
cabin VARCHAR(20) CHARACTER SET LATIN 3 2 0 null null null 4.00E+001 6.00E+001 embarked VARCHAR(20) CHARACTER SET LATIN 5 0 0 null null null 0.00E000 1.00E+002 pclass INTEGER 5 0 null 0 5 0 0.00E000 1.00E+002