From: Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>
To: pgsql-sql@postgresql.org
Subject: complex join question
Date: Fri, 12 Feb 2010 23:32:49 +0100
Message-ID: <20100212223248.GA29691@apartia.fr> (raw)
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,
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: vindex+lists-pgsql-sql@apartia.org
Subject: Re: complex join question
In-Reply-To: <20100212223248.GA29691@apartia.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox