0% found this document useful (0 votes)
19 views

Select Distinct As As As As As As As As As As As AS As From On On On On On On On On Where Group by

This document contains a SQL query that selects computer system details from various database tables and views including the computer name, domain, user, BIOS serial number, system enclosure serial number, manufacturer, model, operating system, assigned site, total memory, hard drive size, free space, and CPU speed. These details are grouped by computer name, domain, username, serial numbers, manufacturer, model, OS, assigned site, total memory, and CPU speed.

Uploaded by

javware
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Select Distinct As As As As As As As As As As As AS As From On On On On On On On On Where Group by

This document contains a SQL query that selects computer system details from various database tables and views including the computer name, domain, user, BIOS serial number, system enclosure serial number, manufacturer, model, operating system, assigned site, total memory, hard drive size, free space, and CPU speed. These details are grouped by computer name, domain, username, serial numbers, manufacturer, model, OS, assigned site, total memory, and CPU speed.

Uploaded by

javware
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

select distinct CS.name0 as 'Computer Name', CS.domain0 as 'Domain', CS.UserName0 as 'User', BIOS.SerialNumber0 as 'Bios serial', SE.

SerialNumber0 as 'System Enclosure serial', CS.Manufacturer0 as 'Manufacturer', CS.Model0 as 'model', OS.Caption0 as 'OS', RAA.SMS_Assigned_Sites0 as 'Site', RAM.TotalPhysicalMemory0 as 'Total Memory', sum(isnull(LDisk.Size0,'0')) as 'Hardrive Size', sum(isnull(LDisk.FreeSpace0,'0')) AS 'Free Space', CPU.CurrentClockSpeed0 as 'CPU Speed' from v_GS_COMPUTER_SYSTEM CS right join v_GS_PC_BIOS BIOS on BIOS.ResourceID = CS.ResourceID right join v_GS_SYSTEM SYS on SYS.ResourceID = CS.ResourceID right join v_GS_OPERATING_SYSTEM OS on OS.ResourceID = CS.ResourceID right join v_RA_System_SMSAssignedSites RAA on RAA.ResourceID = CS.ResourceID right join V_GS_X86_PC_MEMORY RAM on RAM.ResourceID = CS.ResourceID right join v_GS_Logical_Disk LDisk on LDisk.ResourceID = CS.ResourceID right join v_GS_Processor CPU on CPU.ResourceID = CS.ResourceID right join v_GS_SYSTEM_ENCLOSURE SE on SE.ResourceID = CS.ResourceID where LDisk.DriveType0 =3 group by CS.Name0, CS.domain0, CS.Username0, BIOS.SerialNumber0, SE.SerialNumber0, CS.Manufacturer0, CS.Model0, OS.Caption0, RAA.SMS_Assigned_Sites0, RAM.TotalPhysicalMemory0, CPU.CurrentClockSpeed0

You might also like