# View: dt_supply_chain_sale_start_dates_membran

**View Name:** dt_supply_chain_sale_start_dates_membran
**Table Source:** `Derived from: Art_Relations_Prod_Art_Relations.Product_Physical, Art_Relations_Prod_Art_Relations.Product_Physical_Supply_Chain_Metadata, Art_Relations_Prod_Art_Relations.Releases, Orchard_App_Reporting_V2, Orchard_App_Reporting_V2.Art_Relations_Prod_Art_Relations`
**File Path:** `dt_supply_chain_sale_start_dates_membran.view.lkml`

## Overview

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

## 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
      where p.store_id = 740 OR p.store_id is null
      group by 1,2,3,4,5;;
```

