SELECT count(*) ,  flag FROM ship GROUP BY flag
Group by ships by flag, and return number of ships that have each flag.
SELECT count ( * ) , flag FROM ship GROUP BY flag
select count ( * ) , flag from ship group by flag
Group by ships by flag , and return number of ships that have each flag .