Report with PC Count
Hi,
I already have a report that gives me the system name, user full name, and system model. I just want a count/total number of machines to show on the report. How do I do this? This is what the SQL looks like:
SELECT MACHINE.NAME AS SYSTEM_NAME, USER_FULLNAME, CS_MODEL FROM MACHINE WHERE CS_MODEL LIKE '%4610%' ORDER BY MACHINE.NAME asc,USER_FULLNAME asc,CS_MODEL asc
I already have a report that gives me the system name, user full name, and system model. I just want a count/total number of machines to show on the report. How do I do this? This is what the SQL looks like:
SELECT MACHINE.NAME AS SYSTEM_NAME, USER_FULLNAME, CS_MODEL FROM MACHINE WHERE CS_MODEL LIKE '%4610%' ORDER BY MACHINE.NAME asc,USER_FULLNAME asc,CS_MODEL asc
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
rmeyer
13 years ago
Hi
Try to add "count(*) as Amount" like in the report below, this is just an example I have to count PC's in each country with a custom language code enviroment variable on PC's
SELECT (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=2443) AS Language_Code, count(*) as Amount FROM MACHINE group by Language_Code ORDER BY Language_Code asc
Try to add "count(*) as Amount" like in the report below, this is just an example I have to count PC's in each country with a custom language code enviroment variable on PC's
SELECT (SELECT MACHINE_CUSTOM_INVENTORY.STR_FIELD_VALUE FROM MACHINE_CUSTOM_INVENTORY WHERE MACHINE_CUSTOM_INVENTORY.ID=MACHINE.ID AND MACHINE_CUSTOM_INVENTORY.SOFTWARE_ID=2443) AS Language_Code, count(*) as Amount FROM MACHINE group by Language_Code ORDER BY Language_Code asc
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.