view: dt_season_start_date_podcast { derived_table: { sql: Select e.podcast_id, p.title, e.season_number, min(e.published_Date) as season_start_date from ORCHARD_APP_REPORTING_V2.PROD_OWS_PODCAST_OWS_PODCAST.EPISODE e inner join ORCHARD_APP_REPORTING_V2.PROD_OWS_PODCAST_OWS_PODCAST.PODCAST p on e.podcast_id = p.id where season_number is not null and e.episode_number = 1 group by 1,2,3 order by 1,3;; } dimension: podcast_id { type: number hidden:yes sql: ${TABLE}.podcast_id ;; } # dimension: episode_id { # type: number # primary_key: yes # sql: ${TABLE}.id ;; # } dimension: season_number { type: number sql: ${TABLE}.season_number ;; } dimension: season_start_date { type: date sql: ${TABLE}.season_start_date ;; } }