Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Summing up minutes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Summing up minutes
Divers
Thread ID:
00493620
Message ID:
00493620
Vues:
50
I have a table with fields: phone_number, city, state, duration.
The phone_number field is 10 characters, I only need the first 6 of them (area code and prefix).
i need a query that will go through the table of 20 million records and for each phone number that is the same, add up the minutes for that number. this is what i tried:

select state, city, padr((left(phone_number,6)), 10) as phone_num;
sum (bill_dur) as minutes;
order by minutes desc;
from calls_table;
group phone_num

i can not get it to work.
any ideas?
thanks,
Ryan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform