CREATE TABLE plays_games (stuid NUMBER, gameid NUMBER, hours_played NUMBER)
CREATE TABLE student (stuid NUMBER, lname CLOB, fname CLOB, age NUMBER, sex CLOB, major NUMBER, advisor NUMBER, city_code CLOB)
CREATE TABLE video_games (gameid NUMBER, gname CLOB, gtype CLOB)
CREATE TABLE sportsinfo (stuid NUMBER, sportname CLOB, hoursperweek NUMBER, gamesplayed NUMBER, onscholarship CLOB)

Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.
SELECT lname, sex FROM student WHERE stuid IN (SELECT T1.stuid FROM plays_games AS T1 JOIN video_games AS T2 ON T1.gameid = T2.gameid WHERE T2.gname = "Call of Destiny" INTERSECT SELECT T1.stuid FROM plays_games AS T1 JOIN video_games AS T2 ON T1.gameid = T2.gameid WHERE T2.gname = "Works of Widenius")
WITH "_u_0" AS (SELECT ARRAY_AGG("stuid") AS "", "T2"."gname" AS "_u_1" FROM "plays_games" "T1" JOIN "video_games" "T2" ON "T1"."gameid" = "T2"."gameid" GROUP BY "T2"."gname") SELECT "lname", "sex" FROM "student" LEFT JOIN "_u_0" "_u_0" ON "Call of Destiny" = "_u_0"."_u_1" WHERE ARRAY_ANY("_u_0"."", "_x" -> "stuid" = "_x")