I am trying to run a query where we find movies based on an actors name. When I run
SELECT known_titles
from name_basics
where name like 'Tom Cruise'
The datasource we have returns a single TEXT field of tt0181689,tt0092099,tt0116695,tt0325710.
How could I use this to query again? My main query is:
SELECT movie_name
from MOVIE_INFO
where movie_id like (SELECT known_titles
from name_basics
where name like 'Tom Cruise'
)
But this is returning nothing. Is there a way I can do a movie_id wildcard search in PostgreSQL that will see what is similar? Something like SELECT movie_name from MOVIE_INFO where movie_id in tt0181689,tt0092099,tt0116695,tt0325710?
The list of tt0181689,tt0092099,tt0116695,tt0325710 is stored as TEXT in a single cell and is copied from a CSV file using PostgreSQL \copy command.