Full Outer Join with dates as index?

Поиск
Список
Период
Сортировка
От Bruche,ME (pgr)
Тема Full Outer Join with dates as index?
Дата
Msg-id 8B53E5C2D3D88545A67BE04D8EA3CCB5E38599@exs1.backup
обсуждение исходный текст
Ответы Re: Full Outer Join with dates as index?  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Список pgsql-novice
Hi,

I need to do something like a full outer join on two tables that contain dates and prices that were observed on these
dates(call them the prices of apples and oranges), but I want only one column of dates. On some days, the price of
applesis observed but the price of oranges is not observed, and vice versa. The tables look something like this: 

price_of_oranges:
date        price_of_oranges
1999-1-1    3.45
1999-1-3    4.65

price_of_apples:
date        price_of_apples
1999-1-2    5.87

What I want is a table that looks like this:
date        price_of_oranges        price_of_apples
1999-1-1    3.45                NULL
1999-1-2    NULL                5.87
1999-1-3    5.87                NULL

What's the easiest way to do this?

Thanks.

Max

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

Предыдущее
От: sibusiso xolo
Дата:
Сообщение: problems retrieving images in 7.3.4
Следующее
От: Bruno LEVEQUE
Дата:
Сообщение: Re: 7.4Beta2 installation not finding OpenSSL