Re: all the table values equal

From: Michele Petrazzo - Unipex <michele(dot)petrazzo(at)unipex(dot)it>
To: Oliveiros d'Azevedo Cristina <oliveiros(dot)cristina(at)marktest(dot)pt>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: all the table values equal
Date: 2010-09-17 15:45:13
Message-ID: 4C938D09.3050105@unipex.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Oliveiros d'Azevedo Cristina ha scritto:
> Howdy , Michele,
>
> Give this a try
>
> SELECT id_user FROM t_your_table WHERE datetime BETWEEN A -- plug
> here beginning of interval AND B -- and end here GROUP BY id_user
> HAVING COUNT(*) = -SUM(value)
>
> Then tell me if it gives you what you want

Thanks,
it works, but... it's really a trickle that exploits the value -1 if I
understand how its work.
If there is another value where look for? Example 13?

Thanks

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jann Röder 2010-09-19 23:04:07 Re: Table returning functions
Previous Message Oliveiros d'Azevedo Cristina 2010-09-17 15:03:25 Re: all the table values equal