Subject | RE: [firebird-support] Select statement column lists question - Invalid Token |
---|---|
Author | Sasha Matijasic |
Post date | 2008-02-28T21:52:32Z |
>This can not work, you are grouping by aggregate function and that has no meaning. Can you post DDL of tables and what are you trying to achieve?
> I want to do a fairly simple 'group by' select statement but only
> certain combinations work.
>
> What I want is the following to work:
>
> select count(*)
> , cast(aDT as date)
> ,(select category from procedures where proc_id = orders.proc_id )
> from orders
> group by 1,2
> order by 1;
>
> Running the above causes the ambiguous Invalid Token error (with or
> without the count(*) column).
>
Sasha