Below are some SCCM sql queries for your SSRS reports, all queries work with SCCM 2012 or greater.
Bootupreport – This report will display when a computer was last rebooted
select distinct
v_R_System.Netbios_Name0,
v_R_System.User_Name0 as ‘User Name’,
v_GS_OPERATING_SYSTEM.LastBootUpTime0,
v_GS_OPERATING_SYSTEM.InstallDate0,
v_R_System.Client0,
v_R_System.Obsolete0,
v_R_System.Active0,
v_R_System.Operating_System_Name_and0
from v_R_System inner
join v_GS_OPERATING_SYSTEM on v_GS_OPERATING_SYSTEM.ResourceID = v_R_System.ResourceId
computer without a specific software installed, change the place software here section
Select Distinct
sys.Netbios_Name0,
sys.Operating_System_Name_and0,
sys.User_Domain0,
sys.User_Name0
FROM
v_R_System sys
JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
WHERE
sys.ResourceID not in (select sys.ResourceID
from
v_R_System sys
JOIN v_Add_Remove_Programs arp ON sys.ResourceID = arp.ResourceID
where
DisplayName0 like ‘%place software name here%’)
Computer Update Report – This report will show computers with Compliance status.
SELECT v_R_System.Name0, v_Update_ComplianceStatus.Status, v_UpdateInfo.BulletinID, v_UpdateInfo.ArticleID, v_UpdateInfo.Description, v_UpdateInfo.Title,
v_UpdateInfo.DatePosted
FROM v_R_System INNER JOIN
v_Update_ComplianceStatus ON v_R_System.ResourceID = v_Update_ComplianceStatus.ResourceID INNER JOIN
v_UpdateInfo ON v_Update_ComplianceStatus.CI_ID = v_UpdateInfo.CI_ID
WHERE (v_Update_ComplianceStatus.Status = 2) AND (v_UpdateInfo.DatePosted <= CONVERT(DATETIME, ‘2017-01-01 00:00:00’, 102))
Email query – This report will show a list of users with their email address.
SELECT UMR.MachineResourceID, UMR.MachineResourceName, UMR.UniqueUserName, Mail0
FROM v_R_User U
JOIN v_UserMachineRelationship UMR ON UMR.UniqueUserName = U.Unique_User_Name0
Number of Cores Report
SELECT
DISTINCT(CPU.SystemName0) AS [System Name],
CPU.Manufacturer0 AS Manufacturer,
CPU.Name0 AS Name,
COUNT(CPU.ResourceID) AS [Number of CPUs],
CPU.NumberOfCores0 AS [Number of Cores per CPU],
CPU.NumberOfLogicalProcessors0 AS [Logical CPU Count]
FROM [dbo].[v_GS_PROCESSOR] CPU
GROUP BY
CPU.SystemName0,
CPU.Manufacturer0,
CPU.Name0,
CPU.NumberOfCores0,
CPU.NumberOfLogicalProcessors0
Duplicate Computer Query
SELECT dbo.v_RA_System_MACAddresses.MAC_Addresses0, Count(dbo.v_R_System.Name0) AS SystemCount
FROM dbo.v_R_System RIGHT OUTER JOIN dbo.v_RA_System_MACAddresses
ON dbo.v_R_System.ResourceID = dbo.v_RA_System_MACAddresses.ResourceID
GROUP BY dbo.v_RA_System_MACAddresses.MAC_Addresses0 ORDER BY SystemCount DESC
Hardware Inventory with Users full name
SELECT sys.Netbios_Name0 AS AssetID, v_GS_COMPUTER_SYSTEM.Manufacturer0 AS Make, v_GS_COMPUTER_SYSTEM.Model0 AS Model,
v_GS_PC_BIOS.SerialNumber0 AS [Serial Number], sys.AD_Site_Name0 AS [AD Site Location], vWorkstationStatus.LastHardwareScan AS [Last Hardware Scan], MAX(v_AgentDiscoveries.AgentTime) AS Discovery_time,
usr.Full_Domain_Name0 + ‘\’ + sys.User_Name0 AS [User Name], usr.Full_User_Name0 AS [Full User Name]
FROM v_AgentDiscoveries
INNER JOIN v_R_User AS usr ON v_AgentDiscoveries.ResourceId = usr.ResourceID RIGHT OUTER JOIN v_GS_PC_BIOS INNER JOIN v_R_System_Valid AS sys ON v_GS_PC_BIOS.ResourceID = sys.ResourceID INNER JOIN v_GS_COMPUTER_SYSTEM ON sys.ResourceID = v_GS_COMPUTER_SYSTEM.ResourceID INNER JOIN vWorkstationStatus ON v_GS_COMPUTER_SYSTEM.ResourceID = vWorkstationStatus.ResourceID ON usr.User_Name0 = sys.User_Name0
GROUP BY sys.Netbios_Name0, usr.Full_Domain_Name0 + ‘\’ + sys.User_Name0, sys.AD_Site_Name0, v_GS_PC_BIOS.SerialNumber0, v_GS_COMPUTER_SYSTEM.Manufacturer0,
v_GS_COMPUTER_SYSTEM.Model0, vWorkstationStatus.LastHardwareScan, usr.Full_User_Name0 –usr.Full_User_Name0