CALL td_analyze ( 'frequency', 'required_parameter_list [ optional_parameter; [...] ]' );
- required_parameter_list
database = input_database_name; tablename = input_table_name; columns = { column_name [,...] | keyword };
- optional_parameter
{ columnstoexclude = column_name [,...] | cumulativeoption = { true | false } | gensqlonly = { true | false } | having = expression | minimumpercentage = min_percentage [,...] | outputdatabase = output_database_name | outputtablename = output_table_name | overwrite = { true | false } | pairwisecolumns = column_name [,...] | statisticscolumns = column_name [,...] | topvalues = top_values | style = { basic | pairwise | crosstab } | where = expression }
Syntax Elements
- database
- The database containing the table to analyze.
- tablename
- The table containing the columns to analyze.
- columns
- The column or columns to analyze—a single BYTE column, one or more columns of any other data type, or a keyword.
- columnstoexclude
- [Optional] The columns to exclude when columns specifies a keyword.
- cumulativeoption
- [Optional] Whether to include rank, cumulative count, and cumulative percent information for each frequency value.
- gensqlonly
- [Optional] True returns the SQL for the function as a result set but does not run it.
- having
- [Optional] A SQL HAVING clause to generate within the function SQL to restrict returned aggregations. Example:
HAVING xpct > 1
- minimumpercentage
- [Optional] The minimum percentage of the time that frequency values must occur to be included in the analysis.
- outputdatabase
- [Optional] The name of the database to contain the analysis results table.
- outputtablename
- [Optional] The name of the table to store the analysis results.
- overwrite
- [Optional] Whether to drop the output tables before creating new ones.
- pairwisecolumns
- [Optional] The columns to pair with the frequency columns.
- statisticscolumns
- [Optional] The columns for which to include in the result set or output table the minimum, maximum, mean value, and standard deviation for itself with the values computed over the rows corresponding to the individual values of the columns specified by columns.
- style
- [Optional] This option sets the frequency style to one of three values.
Style Description basic (default) Counts frequencies of individual column values. If columns specifies multiple columns:- Function repeats the analysis on each column.
- You cannot specify a view with tablename.
- If you specify outputdatabase and outputtablename, generated SQL has one CREATE TABLE statement followed by multiple INSERT/SELECT statements.
pairwise Counts frequencies of pairwise combinations of values of selected columns rather than individually. Disallowed with cumulativeoption=true.
crosstab Counts frequencies of combinations of values of selected columns rather than individually. Generated SQL has single SELECT statement for all columns specified by columns.
Disallowed if columns specifies multiple columns.
- topvalues
- [Optional] The maximum top occurring frequency values to include in the result set or output table. For example, for topvalues=10, the result set or output table includes only the top 10 frequency values.
- where
- [Optional] The expression in the SQL WHERE clause to include in the generated SQL to filter rows selected for analysis.