2. Find the names of stars who have appeared in at least two movies where the profits were greater than 100M.
SELECT DISTINCT ST.sname FROM MovieStar AS ST WHERE ST.SNo IN ( SELECT SI.SNo FROM StarsIn AS SI WHERE SI.MNo IM (SELECT DISTINCT M.MNo FROM Movie AS M WHERE M.profit > 100,000,000 )GROUP BY SI.SNo HAVING COUNT(SI.SNo) >= 2)Íž
3. List the name of a star that has also directed a movie (was a director on a movie).
SELECT DISTINCT S.sname from MovieStar S, Director D where S.sname=D.dname;
4. For each star, find the average profit of the movies he/she has appeared in and display it only if the sum of profits of the movies he/she has appeared in is more than 2M.
Select sName,AVG(profit) AS averageProfit From StarsIn SI,Movie M