Hope every one is fantastic, can any one help me with this question pleaseee. i am working with two tables,
1) TELCO_CALLS
-call_id
-fromAc
-fromtelNo
-toAc
-totelNo
-starttime
-endTime
-charge

2)TELCO_CUSTOMER
-Ac
-TelNo
-first_name
-Age
-last_name

I am to write SQL expression to Aggregate the calls by the telephone number they were made from, presenting the total number of phone calls, total number of minutes, and the total charge
my idea was the one below
select fromtelNo,
sum(fromtelNo) over (partition by Ac) sumFromtelNo,

sum(endtime-starttime) over (partition by call_id) sum(endtime-starttime),

sum(charge) over (partition by call_id) sumCharge
from telco_calls;


Can any one please help?