Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The following page has been changed by ZhengShao: http://wiki.apache.org/hadoop/Hive/HiveQL/GroupBy ------------------------------------------------------------------------------ + [[TableOfContents]] == Group By Syntax == {{{ + groupByClause: GROUP BY groupByExpression (, groupByExpression)* + groupByExpression: expression + + groupByQuery: SELECT expression (, expression)* FROM src groupByClause? }}} - == Simple Examples == + === Simple Examples === + In order to count the number of rows in a table: + {{{ + SELECT COUNT(1) FROM table2; + }}} + In order to count the number of distinct users by gender one could write the following query: {{{ INSERT OVERWRITE TABLE pv_gender_sum
