SELECT SUM (`points`) FROM `dbc_achievement` WHERE `id` IN (SELECT `achievement` FROM `character_achievement` WHERE `guid`=?d)