# View: cm_track_artists

**View Name:** cm_track_artists
**Table Source:** `INTELLIGENCE.DBT_PROD.CM_TRACK_ARTISTS`
**File Path:** `cm_track_artists.view.lkml`

## Overview

- **File Size:** 2777 bytes
- **Lines of Code:** 123
- **Dimensions:** 7
- **Measures:** 0
- **Dimension Groups:** 0
- **Filters:** 0

## Comments & Notes

- derived_table: {
- sql:with track_artists as (
- with track_artist as (select t.name as track_name, t.isrc, a.name, a.id as cm_artist, a.code2 as cm_artist_country

## Dimensions

| Name | Type |
|------|------|
| `track_name` | string |
| `isrc` | string |
| `artist_country` | string |
| `local_artist` | yesno |
| `artist_name` | string |
| `cm_artist` | number |
| `artists` | string |

## Derived Table

```sql
#   sql:with track_artists as (
#with track_artist as (select t.name as track_name, t.isrc, a.name, a.id as cm_artist, a.code2 as cm_artist_country
#from CHARTMETRIC.RAW_DATA.CM_TRACK t
#left join CHARTMETRIC.RAW_DATA.L_CM_TRACK_CM_ARTIST cm on t.id = cm.cm_track
#left join CHARTMETRIC.RAW_DATA.CM_ARTIST a on a.id = cm.cm_artist)
#
#select track_name, isrc as ISRC, cm_artist, name as artist_name, cm_artist_country as artist_country,
##    LISTAGG(DISTINCT(artist_name), ', ')
#    WITHIN GROUP (order by artist_name)
#    OVER (PARTITION BY ISRC) as artists
#from track_artist)
#
#select *
#from track_artists ;;
 #
```

