Try SYSFUN.WEEK(

From: Alexander Kuznetsov <Alexander.Kuznetsov_at_marshmc.com>
Date: 15 May 2002 07:45:33 -0700
Message-ID: <ac5bc7c1.0205150645.175a64db_at_posting.google.com>


Hi Alex,
try this:

SELECT SYSFUN.WEEK(trade_date), COUNT(*) FROM trade GROUP BY SYSFUN.WEEK(trade_date);

Good luck!
Alexander

alex_vlm_at_yahoo.com (Alex) wrote in message news:<ca86b9e9.0205141914.617e0da1_at_posting.google.com>...
> I have to build a 2-dimenshion Chart showing time, number of trades.
> Vertical line would be number of trades
> Horizontal - time
> I have to use number of trades per week as a one point in diagram
> connecting these points into graph which would show trading activity
> over period of time.
>
> # of Trades 100 |
> 80 | *
> 60 | *
> 40 | *
> 20 |
> 0 |_______________________________
> 1st week 2nd week 3d week
>
> Data comes from one table called Trade:
>
> Trade:
> Name Null? Type
> ----------------------------------------- --------
> ----------------------------
> TRADE_ID NOT NULL CHAR(32)
> TRADE_DATE NOT NULL CHAR(10)
> TRADE_QTY NOT NULL NUMBER(15,2)
> TRADE_PRICE NOT NULL NUMBER(15,8)
>
> This query would calculate data for one week:
> select count(*) from trade where trade_date > '2002-05-04' and
> trade_date < '2002-05-12';
>
> How is it possible to get number of trades for each week for period of
> time???
>
> Reporting tool I am going to use for this would be Crystal Reports 8.5
>
> Would very much appreciate your help?
Received on Wed May 15 2002 - 16:45:33 CEST

Original text of this message