Database: county_public_safety

Question: What are the minimum and maximum crime rate of counties?
SQL: SELECT min(Crime_rate) ,  max(Crime_rate) FROM county_public_safety

Question: List the name of the county with the largest population.
SQL: SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1

Question: List the names of the city with the top 5 white percentages.
SQL: SELECT Name FROM city ORDER BY White DESC LIMIT 5

Question: Show the name of cities in the county that has the largest number of police officers.
SQL: SELECT name FROM city WHERE county_ID  =  (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)

Question: Show the number of cities in counties that have a population more than 20000.
SQL: SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population  >  20000)

Question: Show the crime rate of counties with a city having white percentage more than 90.
SQL: SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID WHERE T1.White  >  90

Question: What is the location shared by most counties?
SQL: SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1

Question: List the names of counties that do not have any cities.
SQL: SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)

Question: Show the police force shared by counties with location on the east and west.
SQL: SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "West"