Я использую SCCM представление / таблицы для создания кругового отчета.нужно количество моделей с определенной версией Google Chrome.
, используя следующий запрос
select distinct v_R_System_Valid_Alias.Netbios_Name0 AS [Computer Name],
v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.NormalizedName AS [Product Name],
[Publisher] = CASE when (ISNULL(v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.NormalizedPublisher, N'-1') = N'-1') then @UnknownLoc
Else v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.NormalizedPublisher
End,
[Version] = CASE when (ISNULL(v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.NormalizedVersion, N'-1') = N'-1') then @UnknownLoc
Else v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.NormalizedVersion
End,
[Language] = CASE when (ISNULL(v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.Language0, -1) < 0) then @UnknownLoc
Else CAST(v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.Language0 as nvarchar)
End,
ISNULL(v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.InstallType0, 0) as [Installation Type],
v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.FamilyName AS [Product Family],
v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.CategoryName AS [Product Category],
v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.ProductID0 AS [ProductID],
v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.SoftwareID as [Software ID],
v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.CM_DSLID0 AS [DSL ID]
FROM fn_rbac_GS_INSTALLED_SOFTWARE_CATEGORIZED(@UserSIDs) v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias
INNER JOIN fn_rbac_R_System_Valid(@UserSIDs) v_R_System_Valid_Alias on v_R_System_Valid_Alias.ResourceID = v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.ResourceID
where productName0 like '%Google Chrome%'
order by v_GS_INSTALLED_SOFTWARE_CATEGORIZED_Alias.NormalizedName, Publisher, Version
это дает мне следующий вывод
мне нужна отдельная версия с подсчетом выходного имени модели должно быть
version count(models)
69.0 2000
мне нужно добиться этого без курсора это возможно?