Need help with a query

Поиск
Список
Период
Сортировка
От A B
Тема Need help with a query
Дата
Msg-id AANLkTi=iWg+qLHMh7PBQjx17Qi+7DmSVK1pPZeVt0=OV@mail.gmail.com
обсуждение исходный текст
Список pgsql-novice
Hello.

I'm having a problem with  a probably very simple query.
I need to update a table
foo (x int, y int, last_seen timestamp, unique(x,y));

where the values should be taken from a larger table
bar( x int, y int, seen timestamp);
where each x,y combination occurs several times, and the value in
foo.last_seen should be the value max(seen) for each pair of x,y.
Notice! All combinations of x,y in bar are also in foo, but not the
other way around.

So how do I write a query for this?
Thanks in advance.

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

Предыдущее
От: Robert Wimmer
Дата:
Сообщение:
Следующее
От: "Oliveiros d'Azevedo Cristina"
Дата:
Сообщение: Re: Need help with a query