Formatting query result like a calendar

From: <dahd101+hm3ufk(at)guerrillamail(dot)com>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Formatting query result like a calendar
Date: 2014-04-04 12:34:07
Message-ID: 779cbb18a1d78ad415d8faf6ba1dc9bbcd39@guerrillamail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I have a query result that comes out as follows (this is an excerpt, the whole thing shows a whole month):

Date ID Day
31/03 1 Mon
01/04 0 Tue
02/04 1 Wed
03/04 1 Thu
04/04 0 Fri
07/04 1 Mon
08/04 0 Tue
09/04 1 Wed
10/04 1 Thu
11/04 0 Fri

I need it in the format:

Date Mon Tue Wed Thu Fri
31/03 1 0 1 1 0
07/04 1 0 1 1 0

Any ideas?

Thanks!
Jen

----
Sent using GuerrillMail.com
Block or report abuse: https://www.guerrillamail.com/abuse/?a=UUZnFAFNUKUZqB6742oYYBHUXMbe3cVX

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Ostrochovsky 2014-04-04 14:43:52 Re: Formatting query result like a calendar
Previous Message Igor Neyman 2014-03-20 13:48:15 Re: SQL Query for Foreign constraint