Skip to content
Streaming Codealong Practices - Daniel version
  • AI Chat
  • Code
  • Report
  • Exploring Data

    Unknown integration
    DataFrameavailable as
    df
    variable
    select *
    from amazon
    Unknown integration
    DataFrameavailable as
    df
    variable
    select *
    from disney
    Unknown integration
    DataFrameavailable as
    df
    variable
    select *
    from netflix

    Union our tables

    Unknown integration
    DataFrameavailable as
    df
    variable
    select *, 'amazon' AS service
    from amazon
    UNION
    select *, 'hulu' AS service
    from hulu
    UNION
    select *, 'netflix' AS service
    from netflix
    UNION
    select *, 'disney' AS service
    from disney
    

    Common table Expresion or CTE

    Unknown integration
    DataFrameavailable as
    df
    variable
    WITH service_data AS (
        select *, 'amazon' AS service
        from amazon
        UNION
        select *, 'hulu' AS service
        from hulu
        UNION
        select *, 'netflix' AS service
        from netflix
        UNION
        select *, 'disney' AS service
        from disney
    )
    
    select *
    from service_data as sd
    left join genres as g
    	on sd.title = g.film