Re: all the table values equal - Mailing list pgsql-sql

From Michele Petrazzo - Unipex
Subject Re: all the table values equal
Date
Msg-id 4C98C48D.1070103@unipex.it
Whole thread Raw
In response to Re: all the table values equal  ("Oliveiros d'Azevedo Cristina" <oliveiros.cristina@marktest.pt>)
List 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


pgsql-sql by date:

Previous
From: Gary Stainburn
Date:
Subject: Re: Slow response in select
Next
From: "Oliveiros d'Azevedo Cristina"
Date:
Subject: Re: all the table values equal