Run the below query [use where clause to filter Multi-Client] and add to 2 separate Excel tabs (1 for Single Client configs, 1 for Multi Client configs). Do VLOOKUP to add a used in 360 flag using the second query.


SELECT SRGC.Id, SRGC.[Name] AS ConfigName
      ,SRGC.[Active] AS ConfigActive
    ,C.[MdmId] AS MdmClientId
    ,C.[Name] AS MdmClientName
    ,C.[Active] AS MdmClientActive
    ,CC.[Active] AS ClientConfigurationActive
    ,AST.[Id]
    ,AST.[DisplayName]
    ,CP2.[ParameterValue] AS AlertLimit
  FROM [coordinator].[ServiceRequestGroupConfiguration] SRGC
  LEFT JOIN [coordinator].[ConfigurationClient] CC ON SRGC.[Id] = CC.[ServiceRequestGroupConfigurationId]
  LEFT JOIN [dbo].[Client] C ON CC.[ClientId] = C.[Id]
  LEFT JOIN [coordinator].[ConfigurationParameter] CP ON CP.[EntityType] = 'ServiceRequestGroupConfiguration' AND CP.[EntityId] = SRGC.[Id] AND CP.[ParameterName] = 'ActivitySubTypeId'
  LEFT JOIN [coordinator].[ConfigurationParameter] CP2 ON CP2.[EntityType] = 'ServiceRequestGroupConfiguration' AND CP2.[EntityId] = SRGC.[Id] AND CP2.[ParameterName] = 'Limit'
  LEFT JOIN [threesixty].[ActivitySubType] AST ON AST.[Id] = CAST(CP.[ParameterValue] AS INT)
  --WHERE SRGC.[Name] LIKE 'Multi-Client%' --FOR MULTI-CLIENT
  --WHERE SRGC.[Name] NOT LIKE 'Multi-Client%' --FOR SINGLE CLIENT
  ORDER BY SRGC.[Name]


SELECT DISTINCT [ExternalConfigId]
  FROM [Qtrax].[dbo].[svAssessment]
  WHERE [CustomDataEntryTypeId] = 891 AND ExternalConfigId IS NOT NULL
ORDER BY [ExternalConfigId]