Solve Merfe Conflict
Fix bug, delete sql query part -refs BT#8296
Optimize query - refs BT#8296
Apply to INNER JOIN to gain performance - refs BT#8296
Solve merge conflict
Merge pull request #41 from DeEvo/8296

Fix bug  -refs BT#8296