SQL + 1C

SELECT dbo.SC5382.DESCR AS PHONE, dbo.SC705.DESCR AS FULL_NAME, dbo.SC705.CODE AS NICK

FROM dbo._1SCONST INNER JOIN

dbo.SC5382 ON dbo._1SCONST.OBJID = dbo.SC5382.ID INNER JOIN

dbo.SC705 ON dbo._1SCONST.[VALUE] = dbo.SC705.ID INNER JOIN

(SELECT MAX([DATE]) AS LAST_DATE, OBJID

FROM dbo._1SCONST

WHERE (ID = 5383)

GROUP BY OBJID) DERIVEDTBL ON dbo._1SCONST.[DATE] = DERIVEDTBL.LAST_DATE AND dbo._1SCONST.OBJID = DERIVEDTBL.OBJID