[MySQL] NetApp OCI: Simple Query to Find VM Count Per Clustered ONTAP Storage Array

SELECT 
    s.name,
    s.country,
    s.microCodeVersion,
    count(*)
FROM dwh_inventory.hv_virtual_machine AS vm
JOIN dwh_inventory.hv_data_store_to_internal_volume AS iv ON iv.dataStoreId = vm.dataStoreId
JOIN dwh_inventory.storage AS s ON s.id = iv.storageId
WHERE s.microCodeVersion LIKE '%clustered%'
GROUP BY s.id
ORDER BY 2



Comments