phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Reid <gabriel.r...@gmail.com>
Subject Re: counting returns different results
Date Tue, 10 Jun 2014 21:07:04 GMT
Hi Sean,

That doesn't sound right -- any idea which of the queries (if either)
is returning the correct results?

Any chance you could try this out on a small test table and then post
the relevant DDL and literal queries here?

- Gabriel


On Tue, Jun 10, 2014 at 10:30 PM, Sean Huo <sean@crunchyroll.com> wrote:
> These two queries returns vastly different results:
>
> query1:
> select count(1) from t where date > 'certain day' and device ='A';
>
> query2:
>
> select device, count(1) from t where date >'certain day' and device ='A'
> group by device;
>
> assuming table t has the  composite primary key of
> date timestamp, and device varchar.
>
> What gives?
>

Mime
View raw message