Which flag is least widely used among all ships?
select flag from ship group by flag order by count ( * ) limit 1
How many flags in this table?
select count ( flag ) from ship
Yes.
select count ( distinct built_year ) from ship
How many names in this table?
select count ( distinct name ) from ship
How many types in this table?
select count ( distinct type ) from ship