hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <>
Subject [jira] [Created] (HIVE-16924) Support distinct in presence Gby
Date Tue, 20 Jun 2017 22:40:00 GMT
Ashutosh Chauhan created HIVE-16924:

             Summary: Support distinct in presence Gby 
                 Key: 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

View raw message