Subject | RE: [firebird-support] splitted dates |
---|---|
Author | Alan McDonald |
Post date | 2004-10-19T13:13:30Z |
> there's no problem splitting dates with triggers if you want to.Here's an example
> I use group by on non-split dates and do not experience any performance
> issues. So I'm not sure what your issues here are.
> Alan
>
> Thanks Alan.
> And how do you do to group by by the month in the date? Or by the day in
> the date?
SELECT EXTRACT(YEAR FROM FORECASTDATE) FORECASTYEAR,
EXTRACT(MONTH FROM FORECASTDATE) FORECASTMONTH, sum(LOAN_AMT) LOAN_AMT,
SUM(COMMISSION) COMMISSION, SUM(FEEPAID) FEEPAID FROM TABLENAME
GROUP BY 1, 2
Alan