This method will work alright for the time being. It's actually better than the method they use now anyway.
Thanks for all the ideas. Ed > This looks like two different results... a SQL query returns _one_ > resultset. > > Try this: > > SELECT CompanyName,AgentName,count(*) as ads > FROM table > GROUP BY CompanyName,AgentName > ORDER BY CompanyName,AgentName; > > <URL: http://www.mysql.com/doc/en/SELECT.html > > > The output could be something like this: > > ComanyName AgentName ads > --------------------------------- > Realty Company 1 Agent 1 10 > Realty Company 1 Agent 2 8 > Realty Company 1 Agent 3 20 > Realty Company 2 Agent 1 15 > Realty Company 2 Agent 2 3 > > If you really want separate result tables for each company, you would > probably need to use some programming language. > > -- > Roger > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php