# View: cm_artist_editorials_spotify

**View Name:** cm_artist_editorials_spotify
**Table Source:** `INTELLIGENCE.DBT_PROD.CM_ARTIST_EDITORIALS_SPOTIFY`
**File Path:** `cm_artist_editorials_spotify.view.lkml`

## Overview

- **File Size:** 1063 bytes
- **Lines of Code:** 40
- **Dimensions:** 2
- **Measures:** 0
- **Dimension Groups:** 0
- **Filters:** 0

## Comments & Notes

- derived_table: {
- sql:with artist_editorials as (
- #with editorials as (

## Dimensions

| Name | Type |
|------|------|
| `cm_artist` | number |
| `editorial_count` | number |

## Derived Table

```sql
#      sql:with artist_editorials as (
#
#with editorials as (
#
#select id as ID, playlist_id as PLAYLIST_URI, name as PLAYLIST_NAME, user_id as CURATOR, 'Spotify' as STORE
#from CHARTMETRIC.RAW_DATA.SPOTIFY_PLAYLIST
#where user_id = 'spotify')
#
#select spl.spotify_playlist, sa.cm_artist
#from CHARTMETRIC.RAW_DATA.L_SPOTIFY_PLAYLIST spl
#inner join editorials e on e.id = spl.spotify_playlist
#inner join CHARTMETRIC.RAW_DATA.L_SPOTIFY_ARTIST sal on sal.spotify = spl.spotify
#inner join CHARTMETRIC.RAW_DATA.SPOTIFY_ARTIST sa on sa.id = sal.spotify_artist
#group by 1,2
#order by 1,2)
#
#select cm_artist, count(cm_artist) as editorial_count
#from artist_editorials
#group by 1
#order by 2 desc;;
#
```

