SELECT `q`.`id_cat`, `a`.`id_user`, SUM(`a`.`res`) AS `res`
FROM `users` AS `u`
JOIN `questions` AS `q`
LEFT JOIN `answers` AS `a` ON `a`.`id_vopr` = `q`.`id` AND `a`.`id_user` = `u`.`id`
GROUP BY `q`.`id_cat`, `a`.`user`
HAVING COUNT(*) = COUNT(`a`.`id_vopr`)