SELECT SUM(am3.value) FROM
(
SELECT am2.id, am2.value
FROM auditors_audiences_map AS am2
LEFT JOIN audiences_range_map AS a2 ON (a2.value BETWEEN 13 AND 17)
WHERE am2.audience_id=a2.audience_id
GROUP BY am2.audience_id
) AS am3