Re: JOIN producing duplicate results

Поиск
Список
Период
Сортировка
От Binand Sethumadhavan
Тема Re: JOIN producing duplicate results
Дата
Msg-id CAFBJCCZ5AFRKGY96gVONc_MT17da_tgEZiBx2taaRjSJ1Gogfg@mail.gmail.com
обсуждение исходный текст
Ответ на JOIN producing duplicate results  (Lonni J Friedman <netllama@gmail.com>)
Список pgsql-novice
On 3 May 2012 05:21, Lonni J Friedman <netllama@gmail.com> wrote:
> I've got a query that is joining data across 4 tables to provide data
> based on test results.  The query is working fine, except for the fact

[snip]

This is your query formatted in my favourite SQL formatting style:

http://pastebin.com/cjGAyZ4U

It looks OK to me, so the only reason I can think of (without knowing
the DDL etc.) is data duplication. I would suggest you remove the
joined tables one by one and see which of them is introducing the
duplication (or alternatively, start by querying only smoketests and
then add the joined tables one by one to see which one introduces the
duplication). Then explore the data in that table.

Incidentally, you are not using the table "smoke" for anything. That
would be the first table I'd remove.

Binand

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

Предыдущее
От: Lonni J Friedman
Дата:
Сообщение: JOIN producing duplicate results
Следующее
От: Bibek Behera
Дата:
Сообщение: REGARDING ADDING A DATATYPE LIKE POLYGON