| От | Tim Landscheidt |
|---|---|
| Тема | Re: complex join question |
| Дата | |
| Msg-id | m3vde2ko05.fsf@passepartout.tim-landscheidt.de обсуждение исходный текст |
| Ответ на | complex join question (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>) |
| Список | pgsql-sql |
Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org> wrote: > 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'. You're probably looking for a "LEFT JOIN". Tim
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера