What is wrong with this query?


I have a table called survey_results. It has fields called item and also user_email. I have another table called business_components and it has fields called bus_comp and qualified. For each item in survey_results I want to count the number of rows in business_components where the business_components.bus_comp=survey_result.item AND business_components.qualified="yes". Here is what I came up with:

SELECT sr.user_email,COUNT(bc.bus_comp) FROM survey_results sr, business_components bc…

What is wrong with this query?