Leetcode Problem 1495. Friendly Movies Streamed Last Month

1495. Friendly Movies Streamed Last Month

Leetcode Solutions

Querying Kid-Friendly Movies Streamed in June

  1. Use the SELECT statement to choose the distinct titles from the Content table.
  2. Join the Content table with the TVProgram table on the content_id field using an INNER JOIN.
  3. Apply a WHERE clause to filter for kid-friendly content by checking Kids_content = 'Y'.
  4. Further filter for movies by checking content_type = 'Movies'.
  5. Use the MONTH() and YEAR() functions to filter the program_date to June 2020.
  6. Return the results, which will be the distinct titles of kid-friendly movies streamed in June 2020.
erDiagram
    TVProgram {
        date program_date
        int content_id
        varchar channel
    }
    Content {
        varchar content_id
        varchar title
        enum Kids_content
        varchar content_type
    }
    TVProgram ||--o{ Content : ""

Querying Kid-Friendly Movies Streamed in June Using DATE_FORMAT

Ask Question

Programming Language
image/screenshot of info(optional)
Full Screen
Loading...

Suggested Answer

Answer
Full Screen
Copy Answer Code
Loading...