I have the following working but curious if you guys see a better way of selecting this data? Thanks for any input!declare @Priority table (PID int, PName varchar(10)) insert into @Priority select 1, 'High' union select 2, 'Med' union select 3, 'Low' union select 4, 'Unknown'declare @Status table (SID int, SName varchar(10)) insert into @Status select 1, 'Sent' union select 2, 'Deleted' union select 3, 'Inbox'declare @Message table (MID int, PID INT) insert into @Message select 1, 2 union select 2, 2 union select 3, 1 union select 4, 2 union select 5, 4 union select 6, 3declare @MessageTo table (MTID int, MID int, SID INT, UID INT) insert into @MessageTo select 1, 1, 1, 1 union select 2, 4, 1, 1 union select 3, 2, 2, 2 union select 4, 2, 3, 1 union select 5, 5, 1, 1 union select 6, 6, 2, 1declare @User table (UID int, UName varchar(10)) insert into @User select 1, 'Nathan' union select 2, 'Sam' union select 3, 'Jack'declare @UID intselect @UID = 1select s.SName, p.PName, sum(case when dd.UID is null then 0 else 1 end) cntfrom ( select s.SID, p.PID from @Status s cross join @Priority p )dleftjoin ( select m.MID, m.PID, mt.SID, mt.UID from @Message m inner join @MessageTo mt on m.MID = mt.MID where mt.UID = @UID )dd on d.SID = dd.SID and d.PID = dd.PIDinnerjoin @Priority p on d.PID = p.PIDinnerjoin @Status s on d.SID = s.SIDgroupby s.SName, p.PName, dd.UIDorderby s.SName, p.PName-- desired:SName PName cnt---------- ---------- -----------Deleted High 0Deleted Low 1Deleted Med 0Deleted Unknown 0Inbox High 0Inbox Low 0Inbox Med 1Inbox Unknown 0Sent High 0Sent Low 0Sent Med 2Sent Unknown 1