Can anyone suggest how i can group by the two categories 'Inbound' & 'Outbound'...?
The select doesn't seem to do this.... Here's an example of the results.......
Grateful for any help....
Inbound 0961 .0012549 .05
Inbound 0961 .0050196 .2
Inbound 0961 .0138039 .55
Inbound 0961 .0100392 .4
Inbound 0961 .0062745 .25
Inbound 0961 .0100392 .4
Inbound 0961 .0058562 .23333333
Inbound 0961 .0033464 .13333333
Inbound 0961 .020915 .83333333
Inbound 0961 .0138039 .55
Inbound 0961 .0079477 .31666667
Inbound 0961 .016732 .66666667
Inbound 0961 .0435032 1.7333333
SELECT
DECODE(rating_profile_no,24,'Outbound','Inbound'),
substr(b_digits,1,4),
sum(cumulative_charge/100),
sum(event_duration/60),
DECODE(event_duration,0,0,((sum(event_duration/60))/(sum(cumulative_charge/100)))),
count(*)
FROM
v_cdrq_&dte1
WHERE
b_digits like '09%'
AND
rating_profile_no in (13,24,60,107,108)
GROUP BY
substr(b_digits,1,4),
event_duration,
DECODE(rating_profile_no,24,'Outbound','Inbound')
The select doesn't seem to do this.... Here's an example of the results.......
Grateful for any help....
Inbound 0961 .0012549 .05
Inbound 0961 .0050196 .2
Inbound 0961 .0138039 .55
Inbound 0961 .0100392 .4
Inbound 0961 .0062745 .25
Inbound 0961 .0100392 .4
Inbound 0961 .0058562 .23333333
Inbound 0961 .0033464 .13333333
Inbound 0961 .020915 .83333333
Inbound 0961 .0138039 .55
Inbound 0961 .0079477 .31666667
Inbound 0961 .016732 .66666667
Inbound 0961 .0435032 1.7333333
SELECT
DECODE(rating_profile_no,24,'Outbound','Inbound'),
substr(b_digits,1,4),
sum(cumulative_charge/100),
sum(event_duration/60),
DECODE(event_duration,0,0,((sum(event_duration/60))/(sum(cumulative_charge/100)))),
count(*)
FROM
v_cdrq_&dte1
WHERE
b_digits like '09%'
AND
rating_profile_no in (13,24,60,107,108)
GROUP BY
substr(b_digits,1,4),
event_duration,
DECODE(rating_profile_no,24,'Outbound','Inbound')