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

For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars.
SELECT DISTINCT T3.name, T2.title, T1.stars FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid JOIN reviewer AS T3 ON T1.rid = T3.rid WHERE T2.director = T3.name
SELECT DISTINCT "T3"."name", "T2"."title", "T1"."stars" FROM "rating" AS "T1" JOIN "movie" AS "T2" ON "T1"."mid" = "T2"."mid" JOIN "reviewer" AS "T3" ON "T1"."rid" = "T3"."rid" AND "T2"."director" = "T3"."name"