Friday, 27 March 2015

Machines Count By Desktops/Notebooks Type

SELECT  
CASE ChassisTypes0
    WHEN '10' THEN 'Notebooks'
    ELSE 'Desktops'
END AS "Workstation Type", count(distinct sys.name0) as ClientCount from
v_GS_SYSTEM_ENCLOSURE ENC   
        INNER JOIN 
            v_R_System SYS ON ENC.ResourceID = SYS.ResourceID   
WHERE
    sys.client0=1 AND sys.obsolete0=0 AND active0=1
GROUP BY
    CASE ChassisTypes0
        WHEN '10' THEN 'Notebooks'
        ELSE 'Desktops'
    END
ORDER BY 2 desc

0 commenti:

Post a Comment

Give me you feedback!