Subject Re: Crosstab
Author Petr Jakes
> > 'Group By' by itself may not be sufficient. I know there are hoops
> > 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

IMHO OP is asking for the crosstab (pivot table), not for simple
grouping?

Petr Jakes