4 ms·
Queries like these select primaryTitle, person.primaryName from title, principal, person where title.tconst = 'tt3890160' and title.tconst =
by procaryote 1y ago
Queries like these
select primaryTitle, person.primaryName
from title, principal, person
where title.tconst = 'tt3890160'
and title.tconst = principal.tconst
and principal.nconst = person.nconst
and principal.category = 'director';
are much nicer to write as
select primaryTitle, person.primaryName
from title
join principal on principal.tconst = title.tconst
join person on person.nconst = principal.nconst
where title.tconst = 'tt3890160'
and principal.category = 'director';
Because you separate the filter from the joining, and you're much less likely to forget a join condition
If ambiguity of column names are low enough you could also use `join person using(nconst)`