SELECT count(*) ,  flag FROM ship GROUP BY flag
What are the different ship flags, and how many ships have each?
SELECT count ( * ) , flag FROM ship GROUP BY flag
select count ( * ) , flag from ship group by flag
What are the different ship flags , and how many ships have each ?