Can the K1000 run a report that has totals
I was wondering if I can run a report in the K1000 that would give a total number for a particular field.
We have Dell Optiplex 755's in each of our schools. I want to run a report that has the total number of Optiplex 755's in each building. I wanted the report to look something like this:
Optiplex 755s in the 10.48.x.x range would equal 300
Optiplex 755's in the 10.56.x.x range would equal 200.
I can get a total number of Optiplex 755's in the district, but I'd like to break it down per IP range.
We have Dell Optiplex 755's in each of our schools. I want to run a report that has the total number of Optiplex 755's in each building. I wanted the report to look something like this:
Optiplex 755s in the 10.48.x.x range would equal 300
Optiplex 755's in the 10.56.x.x range would equal 200.
I can get a total number of Optiplex 755's in the district, but I'd like to break it down per IP range.
0 Comments
[ + ] Show comments
Answers (2)
Please log in to answer
Posted by:
chucksteel
8 years ago
You want to group by the first two parts of the IP address, and you can do that using substring_index:
SELECT substring_index(IP, ".", 2) as SUBNET, count(ID) as Count
FROM ORG1.MACHINE
WHERE CS_MODEL = "Optiplex 755"
GROUP BY SUBNET
For a more generic version that includes all of the models in each range you can include the model in the group by statement:
SELECT substring_index(IP, ".", 2) as SUBNET, CS_MODEL, count(ID) as Count
FROM ORG1.MACHINE
GROUP BY SUBNET, CS_MODEL
Posted by:
StockTrader
8 years ago