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 <hadoophi...@gmail.com> 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
>
>

Reply via email to