Hi all,
I have a DB2 timestamp YYYY-MM-DD-HH.MM.SS and i need to pull data by Half Hour Intervals.
here is the following table
purchasesMade US$ timeStamp
1 5 2003-07-06-12-01-03
1 8 2003-07-06-12-04-03
1 12 2003-07-06-12-41-03
1 4 2003-07-06-13-01-03
1 7 2003-07-06-13-15-03
1 11 2003-07-06-13-41-03
For the above data i need result as
TimeIntvl purchasesMade cat-1 cat-2 cat-3
12:30 2 1 1 0
13:00 1 0 0 1
13:30 2 1 1 0
14:00 1 0 0 1
The three categories are between 0-5$ , 6-10$ and 11-15$.
I know i can group by hour in DB2 and also by minute..but confused in getting half hour for the above case.
ANY Suggestions..
thanks in advance
logic4fun
I have a DB2 timestamp YYYY-MM-DD-HH.MM.SS and i need to pull data by Half Hour Intervals.
here is the following table
purchasesMade US$ timeStamp
1 5 2003-07-06-12-01-03
1 8 2003-07-06-12-04-03
1 12 2003-07-06-12-41-03
1 4 2003-07-06-13-01-03
1 7 2003-07-06-13-15-03
1 11 2003-07-06-13-41-03
For the above data i need result as
TimeIntvl purchasesMade cat-1 cat-2 cat-3
12:30 2 1 1 0
13:00 1 0 0 1
13:30 2 1 1 0
14:00 1 0 0 1
The three categories are between 0-5$ , 6-10$ and 11-15$.
I know i can group by hour in DB2 and also by minute..but confused in getting half hour for the above case.
ANY Suggestions..
thanks in advance
logic4fun