Sales&Marketing(5) Accounts and Finance(2)
CatID CatName 1 Sales&Markting 2 Account and Finance 3 Web DEVELOPMENT 4 Media
JobID CatID JOBtitle 1 2 Sales Manager 2 2 Seles Executive 2 3 Java Developer
Quote:SELECT c.CatName, COUNT(j.JobID) as Result FROM Job j right JOIN CATAGORIES c ON j.CatID=c.CatID GROUP BY C.CatName
SELECT FROM (CatName + ' (' + CONVERT(VARCHAR(30),CountOfCtgs) + ')' SELECT C.CatName, COUNT(C.CatName) AS CountOfCtgs FROM Categories AS C INNER JOIN Job AS J ON C.CatID = J.CatID GROUP BY C.CatName ORDER BY C.CatName ) AS T
INNER JOIN
RIGHT JOIN
LEFT JOIN
SELECT c.CatName, COUNT(j.JobID) FROM Job j JOIN Catagories c ON j.CatID=c.CatID GROUP BY C.CatName
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)