| From: | "Oliveiros d'Azevedo Cristina" <oliveiros(dot)cristina(at)marktest(dot)pt> |
|---|---|
| To: | "Michele Petrazzo - Unipex" <michele(dot)petrazzo(at)unipex(dot)it> |
| Cc: | <pgsql-sql(at)postgresql(dot)org> |
| Subject: | Re: all the table values equal |
| Date: | 2010-09-21 15:02:22 |
| Message-ID: | D927FA316ABB44BE8F91E892454BFAA4@marktestcr.marktest.pt |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
>
> Yes. All the users that have only one value into the "value" column and
> that value is NN.
Understood. Try the query from the previous mail, adding the clause WHERE
"value" = NN as I did explain.
>
>> 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
Understood. From the query I sent you just eliminate the "value" column
from the select list, as you are not interested in it.
> Thanks,
> Michele
Best,
Oliver
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oliveiros d'Azevedo Cristina | 2010-09-21 16:11:51 | Re: Help with queries. |
| Previous Message | Tom Lane | 2010-09-21 14:52:11 | Re: Slow response in select |