Subject | Re: [firebird-support] SQL Extract problem - Monthly ordered Qty |
---|---|
Author | Daniel Rail |
Post date | 2003-10-22T14:48:20Z |
Hi,
At October 22, 2003, 11:46, Tanz Anthrox wrote:
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)
At October 22, 2003, 11:46, Tanz Anthrox wrote:
> And, When I try to group it. not workingTry:
> select
> extract(month from order_date) as Exmonths , SUM(Qty_ordered) as QTY
> from sales
> group by Exmonths;
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)