i have a table named ISSUES and another table named PRODUCTS in a mysql database.
ISSUES shares the PRODUCT_ID field with PRODUCTS. PRODUCTS has a field named PRODUCT_NAME.
Each product has a unique PRODUCT_ID, but the PRODUCT_NAME field is not unique because multiple people can have the same model.
i am trying to make a query something like this:
SELECT COUNT(ISSUE_ID) for each PRODUCT_NAME. .. but i can't figure it out. i would have posted in database section, but i think i have to use arrays too.
This would be the end result, MODEL_A is the PRODUCT_NAME
MODEL_A has 50 issues.
MODEL_C has 34 issues.
MODEL_B has 21 issues.
can anyone help me?