You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2017/06/20 22:40:00 UTC

[jira] [Created] (HIVE-16924) Support distinct in presence Gby

Ashutosh Chauhan created HIVE-16924:
---------------------------------------

             Summary: Support distinct in presence Gby 
                 Key: HIVE-16924
                 URL: https://issues.apache.org/jira/browse/HIVE-16924
             Project: Hive
          Issue Type: New Feature
          Components: Query Planning
            Reporter: Carter Shanklin


create table e011_01 (c1 int, c2 smallint);
insert into e011_01 values (1, 1), (2, 2);

These queries should work:
select distinct c1, count(*) from e011_01 group by c1;
select distinct c1, avg(c2) from e011_01 group by c1;

Currently, you get : 
FAILED: SemanticException 1:52 SELECT DISTINCT and GROUP BY can not be in the same query. Error encountered near token 'c1'




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)