SELECT BROKER_NAME, BROKER_ID FROM dbo.tblBrokers b WHERE Broker_Id IN (SELECT OwnerId FROM tbl_SYS_SavedReports WHERE OwnerType = 'BRO' AND temporary = 'N' GROUP BY OwnerId ) order by b.BROKER_NAME for json path