Its a 2 step query, the 1st looks like this in Mapbasic Window: ****************** Select Count(*), Name, zip from test group by Utility, Zip into Count_By_Zip ****************** To produce this in SQL, put your table in the table pull down, put the cursor in Col section and hit the Aggregate button, select Count, in the Group by place Utility and Zip, This will count the number of times a Utility name occurs in the same zip. Be carefull there are not 2 variations on the spelling of one company.
Now query the table the above query produced (Count_By_Zip), selecting all record where Count is Greater than 1 to pull out all the same Utility entries in the table in the same zip. Select * from Count_By_Zip where COL1>1 into Selection William "Woody" Woodruff Zoning Administrator Charter Township of Union, Isabella County, Michigan 2010 S Lincoln Rd, Mt. Pleasant, MI 48858 (989) 772 4600 EXT 41 Visit our web site at http://www.geocities.com/ctuzoning/index.htm -----Original Message----- From: Morris, Rich [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 3:00 PM To: MI-L (E-mail) Subject: MI-L Count Question Listers, I would like to ask for some help. And it is probably a simple solution, but I can't seem to find it. I have a spreadsheet of utilities operating in certain Zip codes. So my table has the State, Zip, and Utility. I would like to find a quick way to see if there are more than one utility, according to this spreadsheet, operating in any given zip code. Or in different terms, I want a list of all zips with more than one utility. tia for your help. rm --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 6003
