select p.projectName, t.ThingName
from projects p
join projectThingLink l on l.projectId = p.projectId
join thing t on t.thingId = l.thingId
where l.createdDate =
( select max(l2.createdDate)
from projectThingLink l2
where l2.thingId = l.thingId
);
POZNÁMKA:Opraveno po komentáři