Describes the different kinds of joins used in SQL Server.
Archive of posts tagged LEFT JOIN
GROUP BY with LEFT JOIN
Simple GROUP BY with LEFT JOIN example:
SELECT
el.LogPortalName
,con.LogTypeFriendlyName
,COUNT(1)
FROM dbo.EventLog el
LEFT JOIN dbo.EventLogTypes con
ON con.LogTypeKey = el.LogTypeKey
GROUP BY el.LogPortalName, con.LogTypeFriendlyName