Skip site navigation (1) Skip section navigation (2)

Re: crosstab

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: John Fabiani <johnf(at)jfcomputer(dot)com>
Cc: "PostgreSQL (SQL)" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: crosstab
Date: 2012-03-12 17:01:21
Message-ID: CAFj8pRCNAMhkkvqjrJfHmhHjGhBhza1bqeNL+ykSfqJUkxw3tw@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
Hello

maybe this article helps
http://stackoverflow.com/questions/3002499/postgresql-crosstab-query

there are more ways

Regards

Pavel Stehule



2012/3/12 John Fabiani <johnf(at)jfcomputer(dot)com>:
> Hi,
> I don't know if it because I'm as sick as dog or I'm just a plain idiot - most
> likely a little of both.
>
> Here is my table
>
> week_of date,
> item_number text,
> planned_demand integer.
>
> I have
> week_of        item_number      planned
> 2012-02-12    00005                200
> 2012-02-19    00005                -30
> 2012-02-26    00005                -16
>
> I want to see
>
> item_number   2012-02-12    2012-02-19   2012-02-26
> 00005                   200                 -30                 -16
>
> I actually have added fields but that should get me started.
>
> Thanks for help from an old man with a very bad cold.
>
> Johnf
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql

In response to

  • crosstab at 2012-03-12 16:58:03 from John Fabiani

Responses

pgsql-sql by date

Next:From: John FabianiDate: 2012-03-12 18:07:12
Subject: Re: crosstab
Previous:From: John FabianiDate: 2012-03-12 16:58:03
Subject: crosstab

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group