[ https://issues.apache.org/jira/browse/HIVE-2884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283870#comment-13283870 ]
Edward Capriolo commented on HIVE-2884: --------------------------------------- I think this is what you need. {noformat} select distinct (STDDEV_SAMP(TXT_1.`age`)) as AgeAlias, distinct (STDDEV_SAMP(TXT_1.`weight`)) as WeightAlias from `CLASS` TXT_1; {noformat} re open if I am wrong. > When "distinct" is used in from of STDDEV, the statement fails with a Java > exception error > ------------------------------------------------------------------------------------------ > > Key: HIVE-2884 > URL: https://issues.apache.org/jira/browse/HIVE-2884 > Project: Hive > Issue Type: Bug > Components: SQL > Affects Versions: 0.7.1 > Reporter: Mauro Cazzari > > Given the following statement: > select distinct STDDEV_SAMP(TXT_1.`age`) as AgeAlias, > STDDEV_SAMP(TXT_1.`weight`) as WeightAlias > from `CLASS` TXT_1; > Hive generates a Java SQL exception error upon execution. If the "distinct" > is removed, the statement runs fine. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira