CREATE TABLE table_name_40 (years VARCHAR2, state VARCHAR2, representative VARCHAR2)

James Hutchins Johnson, from New Hampshire, served during what years?
SELECT years FROM table_name_40 WHERE state = "new hampshire" AND representative = "james hutchins johnson"
SELECT "years" FROM "table_name_40" WHERE "james hutchins johnson" = "representative" AND "new hampshire" = "state"