# View: dt_supply_chain_sale_start_dates

**View Name:** dt_supply_chain_sale_start_dates
**Table Source:** `INTELLIGENCE.DBT_PROD.DT_SUPPLY_CHAIN_SALE_START_DATES`
**File Path:** `dt_supply_chain_sale_start_dates.view.lkml`

## Overview

- **File Size:** 1367 bytes
- **Lines of Code:** 44
- **Dimensions:** 5
- **Measures:** 0
- **Dimension Groups:** 0
- **Filters:** 0

## Comments & Notes

- derived_table: {
- sql: select r.release_id as product_id, r.sale_start_date as default_sale_start_date, p.sale_start_date as specific_sale_start_date, p.store_id as store_id,
- WHEN specific_sale_start_date is not null then specific_sale_start_date

## Dimensions

| Name | Type |
|------|------|
| `product_id` | number |
| `default_sale_start_date` | date |
| `specific_sale_start_date` | date |
| `store_id` | number |
| `sale_start_date` | date |

## Derived Table

```sql
#     sql: select r.release_id as product_id, r.sale_start_date as default_sale_start_date, p.sale_start_date as specific_sale_start_date, p.store_id as store_id,
# CASE
#   WHEN specific_sale_start_date is not null then specific_sale_start_date
#   ELSE default_sale_start_date end as sale_start_date
# from ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.RELEASES r
# inner join ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.PRODUCT_PHYSICAL pp on pp.release_id = r.release_id
# left join ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.PRODUCT_PHYSICAL_SUPPLY_CHAIN_METADATA p on p.product_id = r.release_id
# group by 1,2,3,4,5;;
#
```

