Cross-Tab queries in postgres?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Cross-Tab queries in postgres?
Дата
Msg-id 20020722113558.A26162@svana.org
обсуждение исходный текст
Список pgsql-general
I know they're not supported and that they should be done in the
presentation end of the software. However, I have a case where I need to use
the result as the input to another query. So I'm reading the output, doing
the cross-tab and copying the result back into the database.

Anyway, it doesn't seem to hard to implement so I was wondering if any other
database systems actually implement it. Mostly I'm interested in what syntax
they use to indicate such a query. (I presume it's not in the standard or
it'd be there already).

For those who don't understand what I mean by cross-tab, it's the conversion
of:

A | b | 1
A | c | 2
B | a | 3
B | b | 4
C | c | 5

into:

Column headings:  a, b, c
A |   | 1 | 2
B | 3 | 4 |
C |   |   | 5
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

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

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: Memory usage question
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Cross-Tab queries in postgres?