# View: cm_store_carveouts

**View Name:** cm_store_carevouts
**Table Source:** `INTELLIGENCE.DBT_PROD.CM_STORE_CARVEOUTS`
**File Path:** `cm_store_carveouts.view.lkml`

## Overview

- **File Size:** 1394 bytes
- **Lines of Code:** 56
- **Dimensions:** 3
- **Measures:** 0
- **Dimension Groups:** 0
- **Filters:** 0

## Comments & Notes

- derived_table: {
- sql:  with track_upc as (select t.isrc, i.upc as upc
- from CHARTMETRIC.RAW_DATA.CM_TRACK t

## Dimensions

| Name | Type |
|------|------|
| `isrc` | string |
| `upc` | number |
| `store_restrictions` | string |

## Derived Table

```sql
#    sql:  with track_upc as (select t.isrc, i.upc as upc
#from CHARTMETRIC.RAW_DATA.CM_TRACK t
#inner join facts.prod.dim_track i on i.isrc = t.isrc),
#
#
#careveouts as (select distinct(r.upc), rrs.list_aggregate_restrictions as store_restrictions
#from intelligence.prod.restrictions_release_store rrs
#inner join orchard_app_reporting_v2.art_relations_prod_art_relations.releases r on r.release_id = rrs.release_id
#where rrs.distribution_type = 'Full Track')
#
#select t.isrc as isrc, t.upc as upc, c.store_restrictions as store_restrictions
#from track_upc t
#left join careveouts c on c.upc = t.upc;;
#
```

