complex join question

Поиск
Список
Период
Сортировка
От Louis-David Mitterrand
Тема complex join question
Дата
Msg-id 20100212223248.GA29691@apartia.fr
обсуждение исходный текст
Список pgsql-sql
Hi,

Here is my schema:

cruise_line -> ship(id_line) -> cruise_type(id_ship) -> cruise(id_cruise_type) -> price(id_cruise, id_currency) <-
currency(USD,GBP,EUR,CAD)
 

(a 'cruise' is a 'cruise_type' + a date)

I am trying to display a count of cruise's for each ship and each
currency even if that count is 0.

But I am having trouble building the query, as some 'cruise's might not
(yet) have a 'price' in all currencies and so no link to 'currency'.

Thanks,


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

Предыдущее
От: "Oliveiros C,"
Дата:
Сообщение: Re: "left join" not working?
Следующее
От: Tim Landscheidt
Дата:
Сообщение: Re: complex join question