Когда достаточно хорошо знаешь возможности диалекта все легко и протсо
диалект TransactSQL
DECLARE @mass = (SELECT SUM(value) FROM transact)
SELECT t.river,
SUM(CASE WHEN t.driver IN (1,2,3)THEN t.value ELSE 0 END) AS 'pervochik1',
SUM(CASE WHEN t.driver IN (4,5,6)THEN t.value ELSE 0 END) AS 'pervochik2',
SUM(CASE WHEN t.driver IN (7,8,9)THEN t.value ELSE 0 END) AS 'pervochik3',
SUM(t.value) AS 'itog',
p.value AS 'plan',
SUM(t.value)/@mass AS 'procent'
FROM transacts t
LEFT JOIN plan p ON p.river = t.river
GROUP BY t.river, p.value