Subject | Re: Crosstab |
---|---|
Author | Petr Jakes |
Post date | 2006-05-06T07:33:47Z |
> > 'Group By' by itself may not be sufficient. I know there are hoopsIMHO OP is asking for the crosstab (pivot table), not for simple
> > we have to jump through here to group by a date,
> > because the time is almost always different. You would need
> > something like:
> >
> > Select (Extract(Month from MyDate) || '/' || Extract(Day from
> > MyDate) || '/' || Extract(Year from MyDate)) as
> > JustTheDate, count(Extract(Month from MyDate) || '/' || Extract(Day
> > from MyDate) || '/' || Extract(Year from MyDate))
> > From MyTable
> > Group By 1
>
> select cast(MyDate as Date), count(cast(MyDate as Date))
> From MyTable
> Group By 1
grouping?
Petr Jakes