Refactor SQL statement to prevent table join
Merge pull request #704 from gersmann/master

Refactor SQL statement to prevent table join