I have two tables "employer" and "user", and i want to get total user(according to country) Where "skills" and "entity" column matches (like query) with both table
Table employer
id skills entity
1 Php,Design web
Table user
id skills entity country
33 programming,php web india
44 Graphic designing,php design canada
45 Php web india
46 Dot net test Sri Lanka
Now i want to get result like
id Count country
1 2 india
2 1 canada
i am trying with following query but not working for me, where i am wrong ?
SELECT employer_info.id as employer_id,users_info.country,COUNT(users_info.country) as total
FROM employer_info
JOIN users_info ON employer_info.skills=users_info.skills
GROUP BY users_info.country