Subject Re: [firebird-support] SQL Extract problem - Monthly ordered Qty
Author Daniel Rail
Hi,

At October 22, 2003, 11:46, Tanz Anthrox wrote:
> And, When I try to group it. not working

> select
> extract(month from order_date) as Exmonths , SUM(Qty_ordered) as QTY
> from sales
> group by Exmonths;

Try:

select
extract(month from order_date) as Exmonths , SUM(Qty_ordered) as QTY
from sales
group by 1;

The number 1 is to indicate column number 1 of the result set.

--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)