Today i was playing around with wordpress, found few bunch of tags are not used so it was a bit frustrating to keep deleting them from the wordpress admin.
thought to dig in a bit in the SQL and try and delete the unused ones from there, here is the code i used in the process.
DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE count = 0 );
DELETE FROM wp_term_relationships WHERE term_taxonomy_id not IN (SELECT term_taxonomy_id FROM wp_term_taxonomy);
basically what this does it deletes unused post tags, if you have a better one please share in the comment below.