all the table values equal

From: Michele Petrazzo - Unipex <michele(dot)petrazzo(at)unipex(dot)it>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: all the table values equal
Date: 2010-09-17 14:50:34
Message-ID: 4C93803A.4080706@unipex.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi list,
this is a Friday afternoon question... :)
I have a table like this:

id_user | value | datetime
1 | 1 | xxx
1 | 2 | xxx+1
1 | -1 | xxx+2
2 | -1 | xxx
2 | -1 | xxx+1
3 | 4 | xxx
3 | 10 | xxx+1

I'm trying to create a query that say me which id_user, inside a
interval of time, has all the values -1

The part if the interval it's not a problem, but I'm fighting with the
aggregate...
Someone?

Thanks,
Michele

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Oliveiros d'Azevedo Cristina 2010-09-17 15:03:25 Re: all the table values equal
Previous Message Greg Quinn 2010-09-16 05:45:49 with queries