Delete wordpress tags in bulk

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.

basically what this does it deletes unused post tags, if you have a better one please share in the comment below.