I have to run a query from SQL. Perhaps too easy or not, but unfortunately I do not understand SQL. So here's my tables:
films
id | movie_name
------------
1 | prometheus
names
id | person_name
-----------------
1 | Ridley Scott
2 | Noomi Rapace
3 | Michael Fassbender
4 | Charlize Theron
5 | Damon Lindelof
films_cast
id | film_id | person_id | type
-------------------------------
1 | 1 | 1 | director
2 | 1 | 2 | actor
3 | 1 | 3 | actor
4 | 1 | 4 | actor
5 | 1 | 5 | writer
And how can I reach such a conclusion from these tables:
film_archive
id | movie_name | director | writer | cast
---------------------------------------------------------------------------------------
1 | prometheus | Ridley Scott | Damon Lindelof | Noomi Rapace, Michael Fassbender, Charlize Theron
Thank you!