
Chapter 10. Techniques for data mining in an operational warehouse 389
Customer table to identify the relative RISK level of a particular customer. The
SQL for this query is shown in Example 10-5.
Example 10-5 Joining scoring output with other data warehouse data
SELECT C.CUSTOMER_ID, C.RISK, L.LOAN_ID, L.LOAN_AMOUNT
FROM CUSTOMERS ANALYZE_TABLE (IMPLEMENTATION ‘PROVIDER=SAS;
ROUTINE_SOURCE_TABLE=USER1.SOURCE_TABLE;
ROUTINE_SOURCE_NAME=FRAUD;’) AS C,
LOANS AS L,
WHERE C.CUSOMER_ID = L.CUSTOMER_ID
AND C.RISK > 50
ORDER BY C.RISK DESC;
This SQL query returns an ordered list (by RISK from highest to lowest) of
customers. Each record will list the cust