Subject | Re: [firebird-support] Re: Group by date on a timestamp field |
---|---|
Author | Ivan Prenosil |
Post date | 2005-12-16T09:53:11Z |
>>Thanks Adam! Works great. Why can't I use something like:Then why does this work ??
>>
>>select cast(myfieldname as Date) as SomeName, count(*)
>>from mytablename
>>group by SomeName
>
> Because expressions in SELECT are calculated after expressions in
> GROUP BY.
select cast(myfieldname as Date), count(*)
from mytablename
group by 1
Ivan