You almost for sure will need a sub query to achieve this one way or another.
select movie.title, actor.name
from movie
inner join casting
on movie.id = casting.movieid
and casting.ord = 1 --Assuming this is the cast order flag
inner join actor
on casting.actorid = actor.id
where movie.id in (
select movie.id
from movie
inner join casting
on movie.id = casting.movieid
and casting.actorid = {your actorID in this case Julie Andrew's id
)
Disclaimer: I didn’t test this as you didn’t provide an easy way to do so.
If you really wanted to go by name (which could lead to false positive) then you can add an extra join to the in clause sub query.
1
solved again new query. i am trying to solve this from one hour. please help