Re: all the table values equal

Поиск
Список
Период
Сортировка
От Oliveiros d'Azevedo Cristina
Тема Re: all the table values equal
Дата
Msg-id 81C545E3469E4DF58720C282A469E78A@marktestcr.marktest.pt
обсуждение исходный текст
Ответ на all the table values equal  (Michele Petrazzo - Unipex <michele.petrazzo@unipex.it>)
Ответы Re: all the table values equal
Список pgsql-sql
Hello again, Michele,

I haven't open my mailbox during weekend so I couldn't follow up your 
question.

It would help if you explain a little better the background of the problem 
you're trying to solve.

You want to find all the user IDs which have the same value on a given time 
interval?

Is my understanding correct?

Best,
Oliver

----- Original Message ----- 
From: "Michele Petrazzo - Unipex" <michele.petrazzo@unipex.it>
To: "Oliveiros d'Azevedo Cristina" <oliveiros.cristina@marktest.pt>
Cc: <pgsql-sql@postgresql.org>
Sent: Friday, September 17, 2010 4:45 PM
Subject: Re: [SQL] all the table values equal


> Oliveiros d'Azevedo Cristina ha scritto:
>> Howdy , Michele,
>>
>> Give this a try
>>
>> SELECT id_user FROM t_your_table WHERE datetime BETWEEN A -- plug
>> here beginning of interval AND B -- and end here GROUP BY id_user
>> HAVING COUNT(*) = -SUM(value)
>>
>> Then tell me if it gives you what you want
>
>
> Thanks,
> it works, but... it's really a trickle that exploits the value -1 if I
> understand how its work.
> If there is another value where look for? Example 13?
>
> Thanks
>
> -- 
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql 



В списке pgsql-sql по дате отправления:

Предыдущее
От: Florian Weimer
Дата:
Сообщение: Jagged/ragged arrays
Следующее
От: Dmitriy Igrishin
Дата:
Сообщение: Re: Jagged/ragged arrays