CREATE TABLE venue (venueid INT, venuename VARCHAR)
CREATE TABLE author (authorid INT, authorname VARCHAR)
CREATE TABLE keyphrase (keyphraseid INT, keyphrasename VARCHAR)
CREATE TABLE field (fieldid INT)
CREATE TABLE paper (paperid INT, title VARCHAR, venueid INT, year INT, numciting INT, numcitedby INT, journalid INT)
CREATE TABLE writes (paperid INT, authorid INT)
CREATE TABLE paperdataset (paperid INT, datasetid INT)
CREATE TABLE paperkeyphrase (paperid INT, keyphraseid INT)
CREATE TABLE paperfield (fieldid INT, paperid INT)
CREATE TABLE dataset (datasetid INT, datasetname VARCHAR)
CREATE TABLE cite (citingpaperid INT, citedpaperid INT)
CREATE TABLE journal (journalid INT, journalname VARCHAR)

Which is the first paper by richard bellman ?
SELECT DISTINCT paper.paperid, paper.year FROM author, paper, writes WHERE author.authorname = 'richard bellman' AND paper.year = (SELECT MIN(PAPERalias1.year) FROM author AS AUTHORalias1, paper AS PAPERalias1, writes AS WRITESalias1 WHERE AUTHORalias1.authorname = 'richard bellman' AND WRITESalias1.authorid = AUTHORalias1.authorid AND WRITESalias1.paperid = PAPERalias1.paperid) AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
WITH "_u_0" AS (SELECT MIN("PAPERalias1"."year") FROM "author" AS "AUTHORalias1" JOIN "writes" AS "WRITESalias1" ON "AUTHORalias1"."authorid" = "WRITESalias1"."authorid" JOIN "paper" AS "PAPERalias1" ON "PAPERalias1"."paperid" = "WRITESalias1"."paperid" WHERE "AUTHORalias1"."authorname" = 'richard bellman') SELECT DISTINCT "paper"."paperid", "paper"."year" FROM "author" JOIN "writes" ON "author"."authorid" = "writes"."authorid" JOIN "paper" ON "paper"."paperid" = "writes"."paperid" JOIN "_u_0" AS "_u_0" ON "_u_0"."" = "paper"."year" WHERE "author"."authorname" = 'richard bellman'