Joining more than 2 tables

Поиск
Список
Период
Сортировка
От Jeff Meeks
Тема Joining more than 2 tables
Дата
Msg-id 3AEB6369.DA565D27@net-serv.com
обсуждение исходный текст
Ответы Re: Joining more than 2 tables  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
Hi,
    I am trying to join 3 tables
with this query
    select a.id, a.name, sum(b.qty), sum(c.qty)
    from a, b, c
    where a.id=xxx and b.id=a.id and c.id=a.id

what the sums that get returned look as if they are a cross products of
the b and c tables.

What is the correct way to join these tables?
Pointers to docs is welcome

Thanks
Jeff Meeks
jmeekssr@net-serv.com

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

Предыдущее
От: Alfred Perlstein
Дата:
Сообщение: Re: On the _need_ to vacuum...
Следующее
От: geustace@godzone.net.nz
Дата:
Сообщение: Re: On the _need_ to vacuum...