Commited tests in for Query.php
Commited tests (SELECT DISTINCT) for Query.php
Refactor tests