CREATE TABLE assignedto (scientist DECIMAL, project TEXT)
CREATE TABLE scientists (ssn DECIMAL, name TEXT)
CREATE TABLE projects (code TEXT, name TEXT, hours DECIMAL)

Find the SSN and name of scientists who are assigned to the project with the longest hours.
SELECT T3.ssn, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.ssn WHERE T2.hours = (SELECT MAX(hours) FROM projects)
SELECT "T3"."ssn", "T3"."name" FROM "assignedto" AS "T1" JOIN "projects" AS "T2" ON "T1"."project" = "T2"."code" AND "T2"."hours" = (SELECT MAX("hours") FROM "projects") JOIN "scientists" AS "T3" ON "T1"."scientist" = "T3"."ssn"