SELECT IN_CLUSTER.CLASSID, IN_CATEGORY.DESCR,
				(select count(classubid) from in_subcategory where classid=in_cluster.classid)-	count(classubid),
				count(classubid),
				(select count(classubid) from in_subcategory where classid=in_cluster.classid)
	FROM IN_CLUSTER LEFT OUTER JOIN
    IN_CATEGORY ON 
    IN_CLUSTER.CLASSID = IN_CATEGORY.CLASSID
GROUP BY IN_CLUSTER.CLASSID, IN_CATEGORY.DESCR


SELECT * FROM VW_subcatseleccionadas_cluster