# View: content_deliveries

**View Name:** content_deliveries
**Table Source:** `Derived from: Art_Relations_Prod_Art_Relations.Delivery_History, Art_Relations_Prod_Art_Relations.Distribution_Format, Art_Relations_Prod_Art_Relations.Project, Art_Relations_Prod_Art_Relations.Releases, Art_Relations_Prod_Art_Relations.Track + 3 more`
**File Path:** `views/periscope_migration/content_distribution_statistics/content_deliveries.view.lkml`

## Overview

- **File Size:** 2899 bytes
- **Lines of Code:** 105
- **Dimensions:** 8
- **Measures:** 1
- **Dimension Groups:** 1
- **Filters:** 0

## Comments & Notes

- measure: count_upc{
- label: "Count of UPC"
- type: count

## Dimensions

| Name | Type |
|------|------|
| `upc` | string |
| `delivery_id` | string |
| `track_id` | string |
| `distribution_format_id` | string |
| `context_type` | string |
| `meta_update` | string |
| `customer_master_master_id` | string |
| `deletions` | string |

## Measures

| Name | Type |
|------|------|
| `distinct_count_upc` | count_distinct |

## Dimension Groups

| Name | Type |
|------|------|
| `date_delivered` | time |

## Derived Table

```sql
sql:
    SELECT dh.date_delivered as date_delivered,
    dh.upc as upc,
    dh.delivery_id as delivery_id,
    t.id as track_id,
    r.distribution_format_id as distribution_format_id,
    df.context_type as context_type,
    eq.meta_update as meta_update,
    dh.customer_master_master_id as customer_master_master_id,
    r.deletions as deletions
    FROM ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.delivery_history dh
    INNER JOIN ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.releases r ON r.upc=dh.upc
    INNER JOIN ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.track t ON r.upc=t.upc
    INNER JOIN ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.project p ON r.project_id=p.project_id
    INNER JOIN ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.vendor v ON p.vendor_id=v.vendor_id
    INNER JOIN ORCHARD_APP_REPORTING_V2.REPORTSDD_DIRECT_DELIVERY.ENCODING_QUEUE_DETAIL eqd ON r.upc = eqd.upc and dh.customer_master_master_id = eqd.dms_master_master_id
    INNER JOIN ORCHARD_APP_REPORTING_V2.REPORTSDD_DIRECT_DELIVERY.ENCODING_QUEUE eq ON eq.encoding_queue_id = eqd.encoding_queue_id
    LEFT JOIN "FACTS"."PROD".VENDOR_IN_SERVICE_TIER_SERVICE_TIER vst
    ON v.vendor_id = vst.vendor_id
    LEFT JOIN "FACTS"."PROD".SERVICE_TIER st
    ON st.uuid = vst.service_tier_uuid
    LEFT JOIN ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.DISTRIBUTION_FORMAT df
    ON df.distribution_format_id = r.distribution_format_id;;
```

