[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] all the table values equal
From:       "Oliveiros d'Azevedo Cristina" <oliveiros.cristina () marktest ! pt>
Date:       2010-09-21 15:02:22
Message-ID: D927FA316ABB44BE8F91E892454BFAA4 () marktestcr ! marktest ! pt
[Download RAW message or body]


>
> 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 


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic