I have a dataframe like this:
df <- data.frame( SchoolID=c(\"A\",\"A\",\"B\",\"B\",\"C\",\"D\"), Country=c(\"XX\",\"XX\",\"XX\",\"YY\"
try this..
select School,count(Country) from( select distinct School,Country from tbl_stacko) temp group by School