Added support to select from fn with alias.