added test for query alias handling