select distinct OS, RELEASE, (select count(1) from $table as y where x.OS=y.OS and x.RELEASE=y.RELEASE and y.LIKE='Yes'), (select count(1) from $table as y where x.OS=y.OS and x.RELEASE=y.RELEASE and y.LIKE='No') from $table as x;