# Charge Pricing Breakdowns

Contains detailed pricing breakdowns for charging sessions, 
including total costs, fees, and adjustments. This model filters pricing 
breakdown data to only include records associated with partner charges.

**SQL:** `charge_pricing_breakdowns`

## Schema

| Column Name           | Data Type     | Description                                                                           |
|:----------------------|:--------------|:--------------------------------------------------------------------------------------|
| **Primary ID**        |               |                                                                                       |
| id                    | INTEGER       | Primary key                                                                           |
| **Other IDs**         |               |                                                                                       |
| charge_id             | INTEGER       | Foreign key referencing the associated charging session                               |
| currency_id           | INTEGER       | Foreign key referencing the currency used for pricing                                 |
| **Timestamps**        |               |                                                                                       |
| created_at            | TIMESTAMP_NTZ | Timestamp when the pricing breakdown record was first created                         |
| updated_at            | TIMESTAMP_NTZ | Timestamp when the pricing breakdown record was last modified                         |
| **Attributes**        |               |                                                                                       |
| type                  | VARCHAR       | Categorizes the type of pricing breakdown (e.g., standard, promotional, special rate) |
| precision             | INTEGER       | Indicates the decimal precision used for price calculations                           |
| total_price           | NUMBER        | Total calculated price including all components and adjustments                       |
| total_master_price    | NUMBER        | Primary price component before additional fees or adjustments                         |
| total_secondary_price | NUMBER        | Secondary or supplementary price component, if applicable                             |
| total_fees            | NUMBER        | Sum of all additional fees applied to the charge                                      |
| total_adjustments     | NUMBER        | Net value of all price adjustments, including discounts or surcharges                 |

## Data inclusion criteria
- This table works with `charges` table, requiring that `charge_id` is among the partner's `charges.id` records.

## Data flow
| Upstream tables   | Downstream tables                                   |
|:------------------|:--------------------------------------------------|
| `charges` | `charge_pricing_breakdown_specifications` |
