WordPress: Displaying all the post tags from within a specific taxonomy’s term

http://wordpress.org/support/topic/get-tags-specific-to-category

$category_tags = $wpdb->get_results("
SELECT DISTINCT
terms2.term_id as tag_ID,
terms2.name as tag_name,
t2.count as posts_with_tag
FROM
$wpdb->posts as p1
LEFT JOIN $wpdb->term_relationships as r1 ON p1.ID = r1.object_ID
LEFT JOIN $wpdb->term_taxonomy as t1 ON r1.term_taxonomy_id = t1.term_taxonomy_id
LEFT JOIN $wpdb->terms as terms1 ON t1.term_id = terms1.term_id,

$wpdb->posts as p2
LEFT JOIN $wpdb->term_relationships as r2 ON p2.ID = r2.object_ID
LEFT JOIN $wpdb->term_taxonomy as t2 ON r2.term_taxonomy_id = t2.term_taxonomy_id
LEFT JOIN $wpdb->terms as terms2 ON t2.term_id = terms2.term_id
WHERE (
t1.taxonomy = 'category' AND
p1.post_status="publish" AND
terms1.term_id = '$varcat' AND
t2.taxonomy = 'post_tag' AND
p2.post_status="publish" AND
p1.ID = p2.ID
)
");

change ‘category’ to your custom taxonomy name