Core: fixed typos in SQL

 - fixed getting all resources by specific tag
 - fixed getting all tags by specific resource
Merge pull request #48 from zlamalp/fix_tags

Core: fixed typos in SQL