Grouping by week

From: Caleb Simonyi-Gindele <csg(at)bordervet(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Grouping by week
Date: 2004-08-06 21:29:10
Message-ID: 000001c47bfc$69d79e50$c201a8c0@borderveygqj37
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I'm using

SELECT EXTRACT(WEEK FROM trans_date), SUM(tran_amount) ... GROUP BY
trans_date

and it is being used to group sales results by week. It works really well.

What I'm wondering is if I can shift the week from a Mon-Sun
articulation(default with Postgre) to a Sun-Sat sequence. I need it that way
in order to comply with a legacy stats system.

Thanks,
Caleb

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Oliver Elphick 2004-08-06 22:08:31 Re: Grouping by week
Previous Message Sascha Ziemann 2004-08-06 18:25:02 UNIQUE constraint