human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Representative, Years, State, Party, Lifespan
###Question: What is the lifespan of the democratic party in New York, for which Terence J. Quinn is a representative?
gpt
SELECT Lifespan FROM table WHERE Party = democratic AND State = new york AND Representative = terence j. quinn