add correct join order test
implement correct join order for select queries
Merge pull request #4 from MAXakaWIZARD/pr-correct-join-order

Correct join order