# View: dt_restrictions_label_store

**View Name:** dt_restrictions_label_store
**Table Source:** `INTELLIGENCE.DBT_PROD.RESTRICTIONS_LABEL_STORE`
**File Path:** `dt_restrictions_label_store.view.lkml`

## Overview

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

## Comments & Notes

- derived_table: {
- sql:WITH label_store_restrictions AS (SELECT
- vw.vendor_id,

## Dimensions

| Name | Type |
|------|------|
| `vendor_id` | number |
| `list_aggregate_restrictions` | string |
| `distribution_type` | string |

## Derived Table

```sql
#    sql:WITH label_store_restrictions AS (SELECT
#    vw.vendor_id,
#    cmm.customer_name,
#    dt.name
#FROM intelligence.dbt_prod.active_vendor_contracts vw
#INNER JOIN orchard_app_reporting_v2.art_relations_prod_art_relations.vendor_dms_master_restriction vdmr ON vw.vendor_contract_id = vdmr.vendor_contract_id
#INNER JOIN orchard_app_reporting_v2.art_relations_prod_art_relations.customer_master_master cmm ON cmm.customer_master_master_id = vdmr.customer_master_master_id
#INNER JOIN orchard_app_reporting_v2.art_relations_prod_art_relations.distribution_type dt ON dt.id = vdmr.distribution_type_id
#ORDER BY 1,2,3)
#
#SELECT
#    vendor_id,
#    name AS distribution_type,
#    LISTAGG(DISTINCT lsr.customer_name, ', ') WITHIN GROUP (ORDER BY lsr.customer_name) AS list_aggregate_restrictions
#FROM label_store_restrictions lsr
#GROUP BY 1,2
#ORDER BY 1,2;;
#
```

