fix a bug added a alias name for sub query sql