Skip to content

PREDICTION function – Oracle

by admin on July 30th, 2010

This example returns the average age of customers who are likely to use an affinity card.

SELECT gender, COUNT(*) AS cnt, ROUND(AVG(age)) AS avg_age
FROM mining_data
WHERE PREDICTION(DT_SH_Clas_sample COST MODEL
USING marital_status, education, household_size) = 1
# The PREDICTION function takes into account only the marital_status, education, and household_size predictors.
GROUP BY gender
ORDER BY gender;

C CNT AVG_AGE
- ———- ———-
F 170 38
M 685 42

From → Ruby

No comments yet

Leave a Reply

You must be logged in to post a comment.