Question from the SQL - Fundamentals test

Write a SQL query to retrieve the titles of the movies and the names of their directors.

Medium

Given the following 'movies' and 'directors' tables:

movies:
| movie_id | title   | director_id |
|----------|---------|-------------|
| 1        | Movie A | 1           |
| 2        | Movie B | 2           |
| 3        | Movie C | 1           |

directors:
| director_id | name        |
|-------------|-------------|
| 1           | Director 1  |
| 2           | Director 2  |

Which SQL query is the best way to retrieves the titles of the movies and the names of their directors?

Author: Marc AUGIERStatus: Published(Update)Question passed 52 times
Edit
0
Community Evaluations
developer avatar
Dragon parfait
30/07/2024
Filtrer sur le produit cartĂ©sien des deux tables est quand mĂȘme une bien mauvaise pratique. Je pense qu'il faudrait ĂȘtre plus spĂ©cifique sur la question en spĂ©cifiant que l'on cherche la meilleure rĂ©ponse.