| От | Tomasz Myrta |
|---|---|
| Тема | Re: How to write a sql query to get this result? |
| Дата | |
| Msg-id | 3EB0C140.7040700@klaster.net обсуждение исходный текст |
| Ответ на | How to write a sql query to get this result? ("Daniel" <postgresql@dunajsky.com>) |
| Список | pgsql-sql |
Dnia 2003-05-01 05:31, Uz.ytkownik Daniel napisa?: > Hello, > > Is there any way how to retrieve result normally displayed as: > > TOTAL 268 > Administrator 7 > Internet Only 178 > Filtered Internet 7 > > To be like this: > > TOTAL Administrator Internet Only Filtered Internet > 268 7 178 7 > > That means, the rows of the first column of the first case are headers in > the second case. Similarly, the rows of the second column are displayed as > one row. > > Please reply to daniel_katka@hotmail.com Find samething about contrib/tablefunc This problem is well known as cross tab (pivot table). Regards, Tomasz Myrta
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера