SELECT TOP (1000000) tblcomputers.Computer, web40CorrectMemory.Memory, tblBIOS.SerialNumber, tblComputersystem.Manufacturer, tblComputersystem.Model,
tblcomputers.Username, tblPROCESSOR.NumberOfCores, tblPROCESSOR.MaxClockSpeed, tblPROCESSOR.Version, tblPROCESSOR.Name,
CAST(CAST(dbo.tblDiskdrives.Size AS bigint) / 1024 / 1024 / 1024 AS numeric) AS [Total size in GB]
FROM tblcomputers INNER JOIN
tblOperatingsystem ON tblcomputers.Computername = tblOperatingsystem.Computername INNER JOIN
tblComputersystem ON tblcomputers.Computername = tblComputersystem.Computername INNER JOIN
tblComputersystem AS tblComputersystem_1 ON tblcomputers.Computername = tblComputersystem_1.Computername INNER JOIN
web40ActiveComputers ON tblcomputers.Computername = web40ActiveComputers.Computername INNER JOIN
Web40OSName ON Web40OSName.Computername = tblcomputers.Computername INNER JOIN
web40CorrectMemory ON web40CorrectMemory.Computername = tblcomputers.Computername INNER JOIN
tblPROCESSOR ON tblcomputers.Computername = tblPROCESSOR.Computername INNER JOIN
tblADComputers ON tblcomputers.Computername = tblADComputers.Computername INNER JOIN
tblBIOS ON tblcomputers.Computername = tblBIOS.Computername INNER JOIN
tblDiskdrives ON tblcomputers.Computername = tblDiskdrives.Computername
WHERE (web40CorrectMemory.Memory < 2048)
AND (tblPROCESSOR.NumberOfCores < 3)
AND (CAST(CAST(dbo.tblDiskdrives.Size AS bigint) / 1024 / 1024 / 1024 AS numeric) < 20)
AND (tblADComputers.OU LIKE 'PUT YOUR OU INFORMATION IN HERE')
ORDER BY web40CorrectMemory.Memory, tblComputersystem.Model