>I have a table that has two columns, terminating lata and number of minutes. Each individual record is a phone call. Each terminating lata appears many times in the table so therefore are many calls that terminate in the same lata. What I need to do is create a new table that has three fields, terminating lata (having each different terminating lata appearing only once), Number of calls for each terminating lata (how many times a terminating lata appeared in the original table), and number of minutes for each terminating lata (sum of the minutes for each different terminating lata from original table). I really don't know how to go about this.
>Any ideas would be appreciated.
>Thanks,
Ryan,
Use SQL - SELECT into a table. Use the COUNT(*) function to count the number of calls, the SUM() function to total the minutes, and the GROUP BY clause to group the data. It should look something like this:
SELECT Lata, COUNT(*) AS Occurs, SUM(Num_Mins) AS Total_Time;
FROM SourceTable;
GROUP BY Lata;
INTO TABLE NewTable
George
Ubi caritas et amor, deus ibi est