Re: [SQL] Group by date_part

2001-07-11 Thread Richard Huxton
From: "Roberto Mello" <[EMAIL PROTECTED]> > On Tue, Jul 10, 2001 at 08:04:55PM +0100, Graham Vickrage wrote: > > > > The statement I have only selects the count if there is at least 1 order for > > a particular day, which make sense. > > > > I however need a count of 0 for days that don't have an

Re: [SQL] Group by date_part

2001-07-10 Thread Roberto Mello
On Tue, Jul 10, 2001 at 08:04:55PM +0100, Graham Vickrage wrote: > > The statement I have only selects the count if there is at least 1 order for > a particular day, which make sense. > > I however need a count of 0 for days that don't have any. Can anyone help? > > SQL: > > SELECT date_part('

[SQL] Group by date_part

2001-07-10 Thread Graham Vickrage
Hi, I need to select the amount of orders per day from an order table. The statement I have only selects the count if there is at least 1 order for a particular day, which make sense. I however need a count of 0 for days that don't have any. Can anyone help? SQL: SELECT date_part('day', date)