group by date_part - Mailing list pgsql-sql

From M.Mazurek@poznan.multinet.pl
Subject group by date_part
Date
Msg-id Pine.BSF.4.21.0002202332360.72356-100000@arka.poznan.mtl.pl
Whole thread Raw
Responses Re: [SQL] group by date_part  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
HI,
I have a table with some statistics and datetime field (data). I want
select counted records by day of the week.

select count (*) from stats group by date_part('dow',data::datetime_;

I get everthing sortded just as I wanted to, but how can I ad another
column to know which dow it is?
eg:
dow|count
---------
0  |123
4  | 322
...

mazek




pgsql-sql by date:

Previous
From: "Joe Conway"
Date:
Subject: pltcl and LDAP
Next
From: "jdb371"
Date:
Subject: it wont let me delete