What I've got:
A mySQL DB with several tables filled with data on people from numerious countries.
What I need to do:
For all the people in each country I need to summerize the responces to the questions on the form they used to input their data. eg one question asks how long they were in business giving three possible answers. I know that to do just this for country YYY I could SELECT age, COUNT(DISTINCT age) FROM table WHERE Country = 'YYY'.
But how do I do this for all countries, and is there an easy way to have it do a number of diffrent fields (eg age, # of employees...) using SQL rather then a longer and slower program that has to read in all of one country, step through each person, use counters to track the number of responces for each possible answer to each question and then output it before going to the next country?
Thanks!
Ryan
A mySQL DB with several tables filled with data on people from numerious countries.
What I need to do:
For all the people in each country I need to summerize the responces to the questions on the form they used to input their data. eg one question asks how long they were in business giving three possible answers. I know that to do just this for country YYY I could SELECT age, COUNT(DISTINCT age) FROM table WHERE Country = 'YYY'.
But how do I do this for all countries, and is there an easy way to have it do a number of diffrent fields (eg age, # of employees...) using SQL rather then a longer and slower program that has to read in all of one country, step through each person, use counters to track the number of responces for each possible answer to each question and then output it before going to the next country?
Thanks!
Ryan