# View: dt_releases_ingested_top_labels

**View Name:** dt_releases_ingested_top_labels
**Table Source:** `Derived from: Art_Relations_Prod_Art_Relations.Country, Orchard_App_Reporting_V2.Art_Relations_Prod_Art_Relations, Prod.Vw_Dim_Abacus_Ar_Vendor, Prod.Workstation_Fact_Sales_Unified_Dbt, Royalty_Accounting + 3 more`
**File Path:** `dt_releases_ingested_top_labels.view.lkml`

## Overview

- **File Size:** 5896 bytes
- **Lines of Code:** 201
- **Dimensions:** 6
- **Measures:** 2
- **Dimension Groups:** 2
- **Filters:** 1

## Dimensions

| Name | Type |
|------|------|
| `labelid` | string |
| `label_name` | string |
| `country` | string |
| `timeframe` | string |
| `ingestion_type` | string |
| `priority` | string |

## Measures

| Name | Type |
|------|------|
| `releases_ingested` | sum |
| `tracks_ingested` | sum |

## Dimension Groups

| Name | Type |
|------|------|
| `context` | time |
| `current` | time |

## Filters

- `label_country`

## Derived Table

```sql
sql:WITH current_year AS (WITH labels AS (SELECT
    labelid,
    SUM(gross) AS gross
FROM royalty_accounting.prod.workstation_fact_sales_unified_dbt
WHERE accountingperiodid >= (SELECT MAX(accountingperiodid) FROM royalty_accounting.prod.workstation_fact_sales_unified_dbt) - 11
AND labelid IN (

   SELECT
       v.vendor_id
    FROM royalty_accounting_reporting.prod.vw_dim_abacus_ar_vendor v
    INNER JOIN orchard_app_reporting_v2.art_relations_prod_art_relations.country c ON c.id=v.country
    WHERE {% condition label_country %
```

