Using a model built by the decisiontree function, the decisiontreescore function generates SQL statements that score new datasets—that is, CASE statements that classify the predicted value. For example:
SELECT CASE WHEN (subset1 expression1) THEN 'Buy' WHEN (subset2 expression2) THEN 'Do not Buy' END FROM tablename;
The columns in tablename are the same as the columns in the table from which the decisiontree function built the model, except that tablename need not include the predicted or dependent variable column if scoringmethod=score.