Added support for query aliases