Computing Counts in SQL
group by (nodeID, attr1, class)

UNION

Select Count (*) from dataTable

group by (nodeID, attr2, class)

UNION

Select Count (*) from dataTable

group by (nodeID, attrm, class)