CREATE TABLE rating (rid NUMBER, mid NUMBER, stars NUMBER, ratingdate TIME)
CREATE TABLE movie (mid NUMBER, title CLOB, year NUMBER, director CLOB)
CREATE TABLE reviewer (rid NUMBER, name CLOB)

What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?
SELECT T2.title, T2.director FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid WHERE T1.stars > (SELECT AVG(T1.stars) FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid WHERE T2.director = "James Cameron")
WITH "_u_0" AS (SELECT AVG("T1"."stars"), "T2"."director" AS "_u_1" FROM "rating" "T1" JOIN "movie" "T2" ON "T1"."mid" = "T2"."mid" GROUP BY "T2"."director") SELECT "T2"."title", "T2"."director" FROM "rating" "T1" LEFT JOIN "_u_0" "_u_0" ON "James Cameron" = "_u_0"."_u_1" JOIN "movie" "T2" ON "T1"."mid" = "T2"."mid" WHERE "T1"."stars" > "_u_0".""