Subject Re: [firebird-support] Re: Group by date on a timestamp field
Author Ivan Prenosil
>>Thanks Adam! Works great. Why can't I use something like:
>>
>>select cast(myfieldname as Date) as SomeName, count(*)
>>from mytablename
>>group by SomeName
>
> Because expressions in SELECT are calculated after expressions in
> GROUP BY.

Then why does this work ??
select cast(myfieldname as Date), count(*)
from mytablename
group by 1

Ivan