Martin Christensen wrote:
> I have a database of mailing list entries where I would like to do
> some statistics on activity on different days of the week. So say I
> want to do something along the hypothetical lines of
> SELECT COUNT(*) FROM table WHERE day_of_week(date) = 'Mon'
> how do I go about doing that?
select count(*) from table where where to_char(day, 'Day') =
should do it. Note the three space pad on the end of
to make it the same length as 'Wednesday'
In response to
pgsql-novice by date
|Next:||From: pejac||Date: 2000-10-11 07:03:34|
|Subject: About index ...|
|Previous:||From: Martin Christensen||Date: 2000-10-10 14:00:14|
|Subject: Selecting weekdays from datetime|