>i am working with call detail records, which contain millions of records.
>i need to go through and count how many times a each different city appears in the in the table. i need to do this for every city seperately.
>But it would be unreasonable to try and put all of the names of the cities i need to look for like: count where city = ausin.
>is there any way to make is count how many times each city appears in the call detail and tell me?
>
>thanks,
>ryan
Try with the next SELECT clause:
SELECT PADR(City,30), COUNT(*) AS Hits ;
FROM MyTable ;
ORDER BY Hits DESC ;
GROUP BY City
Luis María Guayán
Tucumán, Argentina
________________________________
SysOp de
www.PortalFox.comNada corre como un zorro
________________________________