SQL
stringlengths 18
577
| question
stringlengths 317
11.5k
|
---|---|
SELECT count(*) FROM Fires WHERE OWNER_DESCR = "MISSING/NOT SPECIFIED" | Given the Table fires having columns as FIRE_YEAR has datatype number, DISCOVERY_DATE has datatype number, DISCOVERY_DOY has datatype number, DISCOVERY_TIME has datatype text, STAT_CAUSE_CODE has datatype number, STAT_CAUSE_DESCR has datatype text, CONT_DATE has datatype text, CONT_DOY has datatype text, CONT_TIME has datatype text, FIRE_SIZE has datatype number, FIRE_SIZE_CLASS has datatype text, LATITUDE has datatype number, LONGITUDE has datatype number, OWNER_CODE has datatype number, OWNER_DESCR has datatype text, STATE has datatype text, COUNTY has datatype text, FIPS_CODE has datatype text, FIPS_NAME has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. How many fire cases occur on the land without any owner? |
SELECT LATITUDE FROM Fires GROUP BY LATITUDE ORDER BY count(*) DESC LIMIT 1 | Given the Table fires having columns as FIRE_YEAR has datatype number, DISCOVERY_DATE has datatype number, DISCOVERY_DOY has datatype number, DISCOVERY_TIME has datatype text, STAT_CAUSE_CODE has datatype number, STAT_CAUSE_DESCR has datatype text, CONT_DATE has datatype text, CONT_DOY has datatype text, CONT_TIME has datatype text, FIRE_SIZE has datatype number, FIRE_SIZE_CLASS has datatype text, LATITUDE has datatype number, LONGITUDE has datatype number, OWNER_CODE has datatype number, OWNER_DESCR has datatype text, STATE has datatype text, COUNTY has datatype text, FIPS_CODE has datatype text, FIPS_NAME has datatype text which has NO_PRIMARY_KEY. Answer the question by writing the appropriate SQL code. What is the latitudinal band that is most likely to experience wildfires in the USA? |
SELECT Location FROM GreaterManchesterCrime WHERE Location like "%Street%" GROUP BY Location ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which streets in Manchester have the highest rates of crime? |
SELECT CrimeID FROM GreaterManchesterCrime WHERE Type = "Violence and sexual offences" ORDER BY CrimeTS DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. When was the last instance of a violent or sexual offense in Manchester? |
SELECT Location FROM GreaterManchesterCrime WHERE Type = "Violence and sexual offences" ORDER BY CrimeTS DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Where was the last instance of a violent or sexual offense in Manchester? |
SELECT LSOA FROM GreaterManchesterCrime GROUP BY LSOA ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which neighborhood has the highest crime rate? |
SELECT count(*) FROM GreaterManchesterCrime WHERE Location like "%Eden Street%" | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What is the crime rate for Eden Street area? |
SELECT Type FROM GreaterManchesterCrime GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What is the most common type of crime? |
SELECT Location FROM GreaterManchesterCrime WHERE Type = "Burglary" GROUP BY Location ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which neighborhood/area has the highest burglary rate? |
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which area do most of the crimes happen? |
SELECT LSOA FROM GreaterManchesterCrime GROUP BY LSOA ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which Lower Layer Output Area do most of the crimes happen? |
SELECT CrimeTS FROM GreaterManchesterCrime GROUP BY CrimeTS ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What time do most of the crimes happen? |
SELECT Outcome FROM GreaterManchesterCrime WHERE Location LIKE "%Street%" GROUP BY Outcome ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What are the most likely outcome of the police investigation if the crime happen on "street"? |
SELECT Type FROM GreaterManchesterCrime WHERE LSOA LIKE "%Salford%" GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which type of crime happen the most in Salford? |
SELECT count(*) FROM GreaterManchesterCrime WHERE Outcome = "Under investigation" | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. How many crimes are under investigation? |
SELECT count(*) FROM GreaterManchesterCrime | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. How many crimes has been conducted? |
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 3 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What is the top 3 area of crime conducted? |
SELECT Type FROM GreaterManchesterCrime WHERE Outcome LIKE "%Investigation complete%" GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which type of crime has the highest rate of "Investigation complete"? |
SELECT count(*) FROM GreaterManchesterCrime WHERE Type LIKE "%Drug%" | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. How many crimes were classified as "Drugs"? |
SELECT count(*) FROM GreaterManchesterCrime WHERE Outcome LIke "%Under investigation%" | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. How many crimes are still "Under investigation" to date? |
SELECT Location FROM GreaterManchesterCrime WHERE Type LIke "%Drug%" GROUP BY Location ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which location has the top amount of "Drugs" crime conducted? |
SELECT Type FROM GreaterManchesterCrime GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What’s the most common type of crime? |
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Where is the most dangerous area? |
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Where is the safest area? |
SELECT Location FROM GreaterManchesterCrime WHERE Type = "Violence and sexual offences" GROUP BY Location ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Where is the place with the largest number of sexual offenses crime events? |
SELECT Location FROM GreaterManchesterCrime GROUP BY Location ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. If it is possible to increase the number of police officers, which place is with the first priority? |
SELECT Type FROM GreaterManchesterCrime WHERE Outcome = "Awaiting court outcome" GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which type of crime has the most prosecution cases? |
SELECT Type FROM GreaterManchesterCrime WHERE Outcome = "Investigation complete; no suspect identified" GROUP BY Type ORDER BY count(*) DESC LIMIT 1 | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. Which type of crime has the most investigation complete cases? |
SELECT Outcome FROM GreaterManchesterCrime WHERE CrimeID = "6B:E2:54:C6:58:D2" | Given the Table greater manchester crime having columns as CrimeID has datatype text, CrimeTS has datatype time, Location has datatype text, LSOA has datatype text, Type has datatype text, Outcome has datatype text which has crime id. Answer the question by writing the appropriate SQL code. What is the result in case 6B:E2:54:C6:58:D2? |
Subsets and Splits