| От | Richard Huxton |
|---|---|
| Тема | Re: origins/destinations |
| Дата | |
| Msg-id | 4A12EB79.2070603@archonet.com обсуждение исходный текст |
| Ответ на | origins/destinations (Carson Farmer <carson.farmer@gmail.com>) |
| Список | pgsql-general |
Carson Farmer wrote: > Hi list, > > I have (what I thought was) a relatively simple problem, but my > knowledge of sql is just not good enough to get this done: > > I have a table which is basically a number of individuals with both > their origin and destination as columns (see Table 1). In this case, > origins and destinations are the census area in which they and work. > What I would like to do is generate an nxn matrix (preferably output to > csv but I'll take what I can get), where origins are on the y axis, and > destinations on the x axis (see Table 3). Google a little for crosstab queries with the tablefunc add-ons in the contrib/ directory. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера