---
title: "SQL-028: Retrieve clsPremiumSizeDiscount data"
summary: Retrieve clsPremiumSizeDiscount data
status: draft
owner: Technical Writer
last_reviewed: 2026-07-31
library: SAIF.Business.Policy.Rating
reference_type: package
---

# SQL-028: Retrieve clsPremiumSizeDiscount data

This document records the SQL used by `clsPremiumSizeDiscount` in `SAIF.Business.Policy.Rating`.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-028 |
| **Operation type** | Read |
| **Execution method** | Data portal — criteria SQL |
| **Database** | Oracle |
| **Schema** | [unqualified]** |
| **Command type** | Text |
| **Business object** | `clsPremiumSizeDiscount` |
| **Criteria property** | `RetrieveSQL` |
| **Lifecycle method** | `BeforeRetrieve / AfterRetrieve` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:PremiumDiscountCode` | Input | Not specified | not specified | Bound parameter. |
| `:PremiumAmount` | Input | Not specified | not specified | Bound parameter. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [PREMIUM_DISCOUNT_RANGE](../database-tables.md#premium_discount_range) | SELECT | See sample SQL and source for column usage. |

## Sample SQL

```sql
Select
  PREMIUM_DISCOUNT_RANGE.PREMIUM_DISCOUNT_CODE as PremiumDiscountCode,
  PREMIUM_DISCOUNT_RANGE.LOWER_PREMIUM_RANGE as PremiumRangeLowerLimit,
  PREMIUM_DISCOUNT_RANGE.UPPER_PREMIUM_RANGE as PremiumRangeUpperLimit,
  PREMIUM_DISCOUNT_RANGE.DISCOUNT_RATE as DiscountRate,
  PREMIUM_DISCOUNT_RANGE.BASE_DISCOUNT_AMT as BaseDiscountAmount,
  PREMIUM_DISCOUNT_RANGE.EXCLUDED_PREMIUM_AMT as ExcludedPremiumAmount
From
  PREMIUM_DISCOUNT_RANGE
Where
  PREMIUM_DISCOUNT_RANGE.PREMIUM_DISCOUNT_CODE = :PremiumDiscountCode
  AND PREMIUM_DISCOUNT_RANGE.LOWER_PREMIUM_RANGE <= :PremiumAmount
  and PREMIUM_DISCOUNT_RANGE.upper_PREMIUM_RANGE >= :PremiumAmount
```

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified.

## Sources
- `Business\SAIF.Business.Policy.Rating\clsPremiumSizeDiscount.vb:531-538`