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

Reply via email to