select b.ProfileName,c.City from tblJobs as a
inner join tblProfile as b on b.ID = a.ProfileID
inner join tblCity as c on c.CityID = a.CityID
O / P
Profile Name City
Gym Manager Mumbai
Personal Trainer Mumbai
Personal Trainer Mumbai
Personal Trainer Bengaluru
答案 0 :(得分:1)
似乎你所缺少的只是一个group by
条款和对count
的调用:
SELECT b.ProfileName, c.City, COUNT(*)
FROM tblJobs AS a
INNER JOIN tblProfile AS b ON b.ID = a.ProfileID
INNER JOIN tblCity AS c ON c.CityID = a.CityID
GROUP BY b.ProfileName, c.City