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-21 14:43:25 |
Message-ID: | 4C98C48D.1070103@unipex.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Oliveiros d'Azevedo Cristina ha scritto:
>
> OK, So, analysing your new question, the time interval is still
> important? Or no longer?
It's important but simple to translate into sql, so I remove it from my
question.
> So writting your query in english : "I want all users that don't change
> "value" and their value is equal to x ?"
>
Yes. All the users that have only one value into the "value" column and
that value is NN.
> Or will you need to find all the users that don't change value with just
> one query? And the query would return something like
>
> id_user | value
> 2 | -1
> 4| 3
>
A right result for me, based by my data, will be:
// choosing -1 like value
id_user
2
// choosing 3 like value
id_user
4
and if I add to the table:
id_user | value | datetime
5 | -1 | xxx
5 | -1 | xxx +1
// choosing -1 like value
id_user
2
5
Thanks,
Michele
From | Date | Subject | |
---|---|---|---|
Next Message | Oliveiros d'Azevedo Cristina | 2010-09-21 14:46:49 | Re: all the table values equal |
Previous Message | Gary Stainburn | 2010-09-21 14:35:24 | Re: Slow response in select |