Skip to content
 

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

Related Posts:

Ask a question or post a comment