Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> Help in hive query


+
Manu A 2012-10-10, 06:19
Copy link to this message
-
Re: Help in hive query
Hi Manu,

I believe the last "group by q2.auth_count" is wrong, because it
causes computing average only across lines with same value of
q2.auth_count, which is of course equal to its value.

Best regards,
J. Dolinar

On Wed, Oct 10, 2012 at 8:19 AM, Manu A <[EMAIL PROTECTED]> wrote:
> Hi All,
> The result for the below query is 194965.0        0.0 , but 194965 is the
> result of inner query from count(q1.response). It looks like the outer query
> [select avg(q2.auth_count), stddev_pop(q2.auth_count)]didn't work at all.
>
>
>  //Query
> select avg(q2.auth_count), stddev_pop(q2.auth_count)
> from (
>         select q1.TEXT_CCYY ,count(q1.response) as auth_count
>         from(
>                select * from Sale1 where TEXT_DD=7 AND TEXT_HH=15  AND
> response=00)q1
>         group by q1.TEXT_CCYY,q1.response)q2
> group by q2.auth_count;
>
>
> Please help me is there anything i have to change in query.
>
>
> Thanks & Regards,
> Manu
>
>
+
Manu A 2012-10-10, 09:08
+
dyuti a 2012-10-30, 05:51
+
John Meagher 2012-10-30, 13:57
+
dyuti a 2012-10-31, 11:00
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB