CREATE TABLE keyword (id INT, keyword TEXT)
CREATE TABLE company (id INT, name TEXT, country_code VARCHAR)
CREATE TABLE directed_by (id INT, msid INT, did INT)
CREATE TABLE actor (aid INT, gender TEXT, name TEXT, nationality TEXT, birth_city TEXT, birth_year INT)
CREATE TABLE written_by (id INT, msid INT, wid INT)
CREATE TABLE classification (id INT, msid INT, gid INT)
CREATE TABLE director (did INT, gender TEXT, name TEXT, nationality TEXT, birth_city TEXT, birth_year INT)
CREATE TABLE producer (pid INT, gender TEXT, name TEXT, nationality TEXT, birth_city TEXT, birth_year INT)
CREATE TABLE genre (gid INT, genre TEXT)
CREATE TABLE movie (mid INT, title TEXT, release_year INT, title_aka TEXT, budget TEXT)
CREATE TABLE copyright (id INT, msid INT, cid INT)
CREATE TABLE tv_series (sid INT, title TEXT, release_year INT, num_of_seasons INT, num_of_episodes INT, title_aka TEXT, budget TEXT)
CREATE TABLE made_by (id INT, msid INT, pid INT)
CREATE TABLE tags (id INT, msid INT, kid INT)
CREATE TABLE writer (wid INT, gender TEXT, name TEXT, nationality TEXT, birth_city TEXT, birth_year INT)
CREATE TABLE cast (id INT, msid INT, aid INT, role TEXT)

What is the maximum number of movies in which ' Brad Pitt ' act in a given year ?
SELECT MAX(DERIVED_TABLEalias0.DERIVED_FIELDalias0) FROM (SELECT COUNT(DISTINCT (MOVIE.TITLE)), CAST, MOVIE WHERE ACTORalias0.NAME = ' Brad Pitt ' AND CAST.AID = ACTORalias0.AID AND MOVIE.MID = CAST.MSID GROUP BY MOVIE.RELEASE_YEAR) AS DERIVED_TABLEalias0
WITH "DERIVED_TABLEalias0" AS (SELECT MAX(1) AS "_" WHERE "ACTORalias0"."AID" = "CAST"."AID" AND "ACTORalias0"."NAME" = ' Brad Pitt ' AND "CAST"."MSID" = "MOVIE"."MID" GROUP BY "MOVIE"."RELEASE_YEAR") SELECT MAX("DERIVED_TABLEalias0"."DERIVED_FIELDalias0") FROM "DERIVED_TABLEalias0" AS "DERIVED_TABLEalias0"