pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>
To: Oliveiros d'Azevedo Cristina <oliveiros.cristina@marktest.pt>
Cc: pgsql-sql@postgresql.org
Subject: Re: all the table values equal
Date: Fri, 17 Sep 2010 17:45:13 +0200
Message-ID: <4C938D09.3050105@unipex.it> (raw)
In-Reply-To: <438B32316EF6496D9641819BA16447A2@marktestcr.marktest.pt>
References: <4C93803A.4080706@unipex.it>
	<438B32316EF6496D9641819BA16447A2@marktestcr.marktest.pt>

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



view thread (10+ messages)  latest in thread

Message-ID: <4C938D09.3050105@unipex.it>
Permalink:  ../4C938D09.3050105@unipex.it/
Also on:    postgresql.org/message-id/4C938D09.3050105@unipex.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: michele.petrazzo@unipex.it, oliveiros.cristina@marktest.pt
  Subject: Re: all the table values equal
  In-Reply-To: <4C938D09.3050105@unipex.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox