Explain how you would use SQL to segment application data to evaluate the effectiveness of a newly deployed fraud defense rule.
Use the application, decision, and rule-evaluation data to compare outcomes for applications affected by the rule versus those that were not. Keep the analysis at the application level and return one row per segment.
decision_date, segment, application_count, approved_count, declined_count, approval_ratedecision_date, then segment| Column | Type | Description |
|---|---|---|
| application_idPK | INT | Unique application identifier |
| decision_date | DATE | Date the application was decided |
| decision_status | VARCHAR(20) | Final decision outcome, such as approved or declined |
| channel | VARCHAR(50) | Application channel or surface |
| amount_requested | NUMERIC(12,2) | Requested amount on the application |
| Column | Type | Description |
|---|---|---|
| evaluation_idPK | INT | Unique evaluation record identifier |
| application_id | INT | Application evaluated by the fraud rule |
| rule_name | VARCHAR(100) | Name of the fraud rule |
| rule_decision | VARCHAR(20) | Rule outcome such as flagged or passed |
| evaluated_at | TIMESTAMP | Timestamp when the rule was evaluated |