Re: Discrepancy in query output

Поиск
Список
Период
Сортировка
От Lahari Sengupta
Тема Re: Discrepancy in query output
Дата
Msg-id CAKEx41rbN2KnomiQAOQYkf9VXe0-Q_wY_u3qdFHK+PmU785Xzg@mail.gmail.com
обсуждение исходный текст
Ответ на Discrepancy in query output  (Lahari Sengupta <jhinik8@gmail.com>)
Ответы Re: Discrepancy in query output  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-sql
Specially, if I remove the timing condition and want to select all from servers then it misses one. How is it possible?

On Thu, Feb 22, 2018 at 3:20 PM, Lahari Sengupta <jhinik8@gmail.com> wrote:
My following query sometimes gives 72 rows and sometimes gives 71 rows as output. How could it misses one?

SELECT distinct on (st.gid) sv.timing, st.gid, st.area
FROM servers sv
INNER JOIN sites st
ON (st_distance(sv.geom, st.geom)<8.5) where
        sv.workmode = 1 AND sv.timing >= timestamp '2018-02-02 00:00:00' 
    and sv.timing <= timestamp '2018-02-02 23:59:59'

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

Предыдущее
От: Lahari Sengupta
Дата:
Сообщение: Discrepancy in query output
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Discrepancy in query output