[imp] Sql optimise admin get list of tags. Fixes #4114

removed distinct clause

re added the DISTINCT clause

Improve readability of where clause to get tags