Re: Combine query views into one SQL string

Поиск
Список
Период
Сортировка
От Maik
Тема Re: Combine query views into one SQL string
Дата
Msg-id 9na15r$ku4$1@narses.hrz.tu-chemnitz.de
обсуждение исходный текст
Список pgsql-sql
Its clear, union concat the two results.

But he can also use this join version, if its the intention.

select t1.id, sum(t1.amount), t2.id, sum(t2.amount) from table1 as t1,
table2 as t2 where t1.id=t2.id;

Ciao Maik




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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re:
Следующее
От: yaubi@yaubi.com (Yoann)
Дата:
Сообщение: Number the lines