Using PIVOT:declare @tblArticle table (Article_ID int , Title varchar(50), Body varchar(50))declare @tblTracking table (Tracking_ID int , Tracking_Type varchar(50))declare @tblMapping table( Article_ID int , Tracking_ID int , Views int)insert into @tblArticle (Article_ID, Title, Body) values(1, 'foo', 'foobody'),(2, 'bar' , 'barbody'),(3, 'blah', 'blahbody'),(4, 'junk', 'junkbody')insert into @tblTracking (Tracking_ID, Tracking_Type) values(1, 'Web'),(2, 'Email'),(3, 'Mobile')insert into @tblMapping (Article_ID, Tracking_ID, Views) values(1, 1, 10),(1, 2, 4),(2, 2, 12),(3, 1, 22),(3, 3, 8);with src as ( select a.Article_ID, a.Title, t.Tracking_Type, m.Views from @tblArticle a join @tblMapping m on a.Article_ID = m.Article_ID join @tblTracking t on m.Tracking_ID = t.Tracking_ID )select Article_ID, Title, isnull(Web,0) Web, isnull(Email,0) Email, isnull(Mobile,0) Mobilefrom srcpivot(sum(views) for Tracking_type in (Web,Email,Mobile)) pvt