db_id
stringclasses 69
values | question
stringlengths 24
325
| evidence
stringlengths 0
673
| SQL
stringlengths 23
804
| question_id
int64 0
9.43k
| difficulty
stringclasses 1
value |
---|---|---|---|---|---|
chicago_crime | How many domestic crime cases has Commander Ronald A. Pontecore Jr. been responsible for investigating? | domestic crime refers to domestic = 'TRUE'; person responsible for investigating refers to commander | SELECT SUM(CASE WHEN T2.domestic = 'TRUE' THEN 1 ELSE 0 END) FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T1.commander = 'Ronald A. Pontecore Jr.' | 8,700 | |
chicago_crime | How many crimes against society happened in the Wentworth district according to the FBI? | "Wentworth" is the district_name; crime against society refers to crime_against = 'Society" | SELECT SUM(CASE WHEN T1.crime_against = 'Society' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T3.district_name = 'Wentworth' | 8,701 | |
chicago_crime | What phone number does alderman Emma Mitts have to call if she wants to speak to the commander in charge of the investigation of the crimes that have occurred in her ward? | SELECT T3.phone FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.alderman_first_name = 'Emma' AND T1.alderman_last_name = 'Mitts' | 8,702 | ||
chicago_crime | How many crimes described as 'The theft of a motor vehicle' by the FBI have taken place in the Lake View community? | lake view community refers to community_area_name = 'Lake View'; 'The theft of a motor vehicle' is the description | SELECT SUM(CASE WHEN T3.community_area_name = 'Lake View' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no INNER JOIN Community_Area AS T3 ON T3.community_area_no = T2.community_area_no WHERE T1.description = 'The theft of a motor vehicle.' | 8,703 | |
chicago_crime | In which district have there been more intimidation-type crimes? | more intimidation-type crime refers to Max(Count(primary_description = 'INTIMIDATION')); district refers to district_name | SELECT T3.district_name FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.primary_description = 'INTIMIDATION' GROUP BY T3.district_name ORDER BY COUNT(T1.primary_description) DESC LIMIT 1 | 8,704 | |
chicago_crime | What types of domestic crimes have occurred the most in the North Lawndale community? | "North Lawndale' is the community_area_name; occur the most domestic crime refers to Max(Count(domestic = 'TRUE')) | SELECT T2.domestic FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T1.community_area_name = 'North Lawndale' AND T2.domestic = 'TRUE' GROUP BY T2.domestic ORDER BY COUNT(T2.domestic) DESC LIMIT 1 | 8,705 | |
chicago_crime | In which ward of more than 55,000 inhabitants are there more crimes of intimidation with extortion? | more than 55000 inhabitants refers to Population > 55000; 'INTIMIDATION' is the primary_description; 'EXTORTION' refers to secondary_description; more crime refers to Count(ward_no) | SELECT T3.ward_no FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN Ward AS T3 ON T3.ward_no = T2.ward_no WHERE T1.primary_description = 'INTIMIDATION' AND T1.secondary_description = 'EXTORTION' AND T3.Population > 55000 GROUP BY T3.ward_no ORDER BY COUNT(T3.ward_no) DESC LIMIT 1 | 8,706 | |
chicago_crime | Which commander has had to deal with more cases of criminal sexual abuse? | more cases of criminal sexual abuse refers to Max(Count(secondary_description = 'CRIMINAL SEXUAL ABUSE')) | SELECT T3.commander FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.secondary_description = 'CRIMINAL SEXUAL ABUSE' GROUP BY T3.commander ORDER BY COUNT(T1.secondary_description) DESC LIMIT 1 | 8,707 | |
chicago_crime | What percentage of non-domestic crimes have occurred in the Jefferson Park district? | non domestic crime refers to domestic = 'FALSE'; 'Jefferson Park' is the district_name; percentage = Divide (Count (case_number where domestic = 'FALSE'), Count(case_number)) * 100 | SELECT CAST(COUNT(CASE WHEN T2.domestic = 'FALSE' THEN T2.case_number END) AS REAL) * 100 / COUNT(T2.case_number) FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T1.district_name = 'Jefferson Park' | 8,708 | |
chicago_crime | What is the average population of the wards where apartment crimes have been reported without arrests? | apartment crime refers to location_description = 'APARTMENT'; without arrest refers to arrest = 'FALSE'; average population = AVG(Population) | SELECT AVG(T2.Population) FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.location_description = 'APARTMENT' AND T1.arrest = 'FALSE' | 8,709 | |
chicago_crime | What are the full names of the top 5 most crowded ward aldermen? | most crowded ward refers to Max(Population); full name of alderman refers to alderman_first_name, alderman_last_name | SELECT alderman_first_name, alderman_last_name FROM Ward ORDER BY Population DESC LIMIT 5 | 8,710 | |
chicago_crime | How many crime against property are there? | SELECT COUNT(*) AS cnt FROM FBI_Code WHERE crime_against = 'Property' | 8,711 | ||
chicago_crime | How many districts are there in the police district building with a zip code of 60608? | district refers to district_name | SELECT COUNT(*) AS cnt FROM District WHERE zip_code = 60608 | 8,712 | |
chicago_crime | Who is the crime against criminal sexual abuse? | "Criminal Sexual Abuse" is the title of crime | SELECT crime_against FROM FBI_Code WHERE title = 'Criminal Sexual Abuse' | 8,713 | |
chicago_crime | Which community has the highest number of neighborhoods? | community with highest number of neighborhoods refers to Max(Count(community_area_no)); community refers to community_area_name | SELECT T1.community_area_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no ORDER BY T2.community_area_no DESC LIMIT 1 | 8,714 | |
chicago_crime | How many severe crime incidents were reported at coordinate 41.64820151, -87.54430496? | coordinates refers to latitude, longitude; severe crime refers to index_code = 'I' | SELECT SUM(CASE WHEN T1.longitude = '-87.54430496' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.report_no = T2.iucr_no WHERE T2.index_code = 'I' AND T1.latitude = '41.64820251' | 8,715 | |
chicago_crime | Who is the commanding officer in the district with the highest number of reported crimes where no arrest has been made? | where no arrest refers to arrest = 'FALSE'; highest number of crime refers to Max(Count(report_no)); commanding officer refers to commander | SELECT T2.commander FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.arrest = 'FALSE' GROUP BY T2.commander ORDER BY COUNT(T1.report_no) DESC LIMIT 1 | 8,716 | |
chicago_crime | What are the general and specific descriptions of the most common crime incidents that happened in an aircraft? | in aircraft refers to location_description = 'AIRCRAFT'; general description refers to primary_description; specific description refers to secondary_description; most common crime incidents refers to Max(Count(iucr_no)) | SELECT T2.primary_description, T2.secondary_description FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.location_description = 'AIRCRAFT' GROUP BY T1.iucr_no ORDER BY COUNT(T1.iucr_no) DESC LIMIT 1 | 8,717 | |
chicago_crime | Between Deering and Near West districts, which district reported the most number of crime incidents that happened in a library? | "Deering" and "Near West" are both district_name; 'LIBRARY' is the location_description; district with the most number of crime Max(Count(district_no)) | SELECT T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.district_name IN ('Deering', 'Near West') AND T2.location_description = 'LIBRARY' GROUP BY T1.district_name ORDER BY COUNT(T2.district_no) DESC LIMIT 1 | 8,718 | |
chicago_crime | How many arrests have been made due to forcible entry burglary that took place in a day care center? | "BURGLARY" is the primary_description; 'FORCIBLE ENTRY' is the secondary_description; 'DAY CARE CENTER' is the location_description; arrests have been made refers to arrest = 'TRUE' | SELECT SUM(CASE WHEN T2.arrest = 'TRUE' THEN 1 ELSE 0 END) FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.location_description = 'DAY CARE CENTER' AND T1.secondary_description = 'FORCIBLE ENTRY' AND T1.primary_description = 'BURGLARY' | 8,719 | |
chicago_crime | What is the name of the district with the highest number of domestic violence cases? | domestic violence refers to domestic = 'TRUE'; highest number of case refers to Max(Count(district_no)); name of district refers to distric_name | SELECT T2.district_name FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.domestic = 'TRUE' GROUP BY T2.district_name ORDER BY COUNT(T1.district_no) DESC LIMIT 1 | 8,720 | |
chicago_crime | In the least populated community, what is the most common location of all the reported crime incidents? | least populated refers to Min(Population); community refers to community_area_no; most common location refers to Max(Count(location_description)) | SELECT T2.location_description FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.population = ( SELECT MIN(population) FROM Community_Area ) AND T2.location_description IS NOT NULL GROUP BY T2.location_description | 8,721 | |
chicago_crime | How many violation of laws are there where no arrest has been made? | "The violation of laws " is the description of incidents; no arrest has been made refers to arrest = 'FALSE' | SELECT SUM(CASE WHEN T1.description LIKE '%The violation of laws%' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T2.Arrest = 'FALSE' | 8,722 | |
chicago_crime | What is the precise coordinate of the location where simple assault incidents happened the most in Chatham? | precise coordinates refers to latitude, longitude; 'Simple Assault' is the title of incident; 'Chatham' is the community_area_name; most incident happened refers to Max(Count(latitude, longitude)) | SELECT T2.latitude, T2.longitude FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.title = 'Simple Assault' AND T3.community_area_name = 'Chatham' AND T3.community_area_no = 44 ORDER BY T2.latitude DESC, T2.longitude DESC LIMIT 1 | 8,723 | |
chicago_crime | In the South side community, what is the name of the community with the most reported incidents of unlawful taking, carrying, leading, or riding away of property from the possession or constructive possession of another person? | "unlawful taking, carrying, leading, or riding away of property from the possession or constructive possession of another person" is the description; name of community refer to community_area_name; most reported incidents refers to Max(Count(fbi_code_no)) | SELECT T3.community_area_name FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.side = 'South' AND T1.description = 'The unlawful taking, carrying, leading, or riding away of property FROM the possession or constructive possession of another person.' GROUP BY T3.community_area_name ORDER BY COUNT(T1.fbi_code_no) DESC LIMIT 1 | 8,724 | |
chicago_crime | How many crime against society were reported in Englewood? | "Englewood" is the community_area_name; 'Society' is the crime_against | SELECT SUM(CASE WHEN T3.community_area_name = 'Englewood' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.crime_against = 'Society' | 8,725 | |
chicago_crime | What is the weekly average number of fraud incidents that were reported in January 2018? Provide the description of the location where the majority of fraud incidents occurred in the said month. | fraud incident refers to title = 'Fraud'; reported in January 2018 refers to Substr(date, 1, 1) = '1' AND Substr(date, 5, 4) = '2018'; description of location refers to location_description; weekly average refers to Divide (Count(report_no), 4); majority of incidents occurred refers to Max(Count(location_description)) | SELECT CAST(COUNT(T1.fbi_code_no) AS REAL) / 4 FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE SUBSTR(T2.date, 1, 1) = '1' AND SUBSTR(T2.date, 5, 4) = '2018' | 8,726 | |
chicago_crime | Please list any three community areas with a population of more than 50,000. | population of more than 50000 refers to Population > 50000; community area refers to community_area_name | SELECT community_area_name FROM Community_Area WHERE population > 50000 LIMIT 3 | 8,727 | |
chicago_crime | What are the communities that are grouped together on the central side? | central side refers to side = 'Central'; community refers to community_area_name | SELECT community_area_name FROM Community_Area WHERE side = 'Central' | 8,728 | |
chicago_crime | What is the difference between the number of communities that are located on the north and south sides with a population of more than 30,000? | population of more than 30000 refers to Population > 30000; 'North' and 'South' both are the side; different number of community refers to Subtract(Count(Community_area_no where side = 'South'), Count(Community_area_no where side = 'North')) | SELECT SUM(CASE WHEN side = 'South ' THEN 1 ELSE 0 END) - SUM(CASE WHEN side = 'North' THEN 1 ELSE 0 END) AS DIFF FROM Community_Area WHERE population > 300000 | 8,729 | |
chicago_crime | Please list all of the contact information for the police district Near West. | "Near West" is the district_name; all contact information refers to phone, fax, tty, twitter | SELECT phone, fax, tty, twitter FROM District WHERE district_name = 'Near West' | 8,730 | |
chicago_crime | Who is responsible for crime cases in district Lincoln? | "Lincoln" is the district_name; responsible for crime case refers to commander | SELECT commander FROM District WHERE district_name = 'Lincoln' | 8,731 | |
chicago_crime | What is the general and specific description of incident 275? | incident 275 refers to iucr_no = 275; general description refers to primary_description; specific description refers to secondary_description | SELECT primary_description, secondary_description FROM IUCR WHERE iucr_no = 275 | 8,732 | |
chicago_crime | What is the percentage of severe cases that are related to sexual assault? | related to sexual assault refers to primary_description = 'CRIME SEXUAL ASSAULT'; severe case refers to index_code = 'I'; percentage = Divide (Count (iucr_no where primary_description = 'CRIME SEXUAL ASSAULT'), Count (iucr_no)) * 100 | SELECT CAST(SUM(CASE WHEN primary_description = 'CRIM SEXUAL ASSAULT' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM IUCR WHERE index_code = 'I' | 8,733 | |
chicago_crime | What are the neighborhoods that are located in the North Center community area? | "North Center" is the community_area_name; neighborhoods refers to neighborhood_name | SELECT T2.neighborhood_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.community_area_name = 'North Center' | 8,734 | |
chicago_crime | How many neighborhoods can be found in the Forest Glen community area? | "Forest Glen" is the community_area_name; neighborhoods refers to neighborhood_name | SELECT SUM(CASE WHEN T2.community_area_name = 'Forest Glen' THEN 1 ELSE 0 END) FROM Neighborhood AS T1 INNER JOIN Community_Area AS T2 ON T1.community_area_no = T2.community_area_no | 8,735 | |
chicago_crime | What is the total population of the neighborhoods Avondale Gardens, Irving Park, Kilbourn Park, Merchant Park, Old Irving Park, and The Villa? | "Avoladale Gardens", "Irving Park", "Kilbourn Park", "Merchant Park", "Old Irving Park", "The Villa" are neighborhood_name; total population refers to Sum(Population) | SELECT SUM(T2.population) AS sum FROM Neighborhood AS T1 INNER JOIN Community_Area AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.neighborhood_name = 'Avondale Gardens' OR T1.neighborhood_name = 'Irving Park' OR T1.neighborhood_name = 'Kilbourn Park' OR T1.neighborhood_name = 'Merchant Park' OR T1.neighborhood_name = 'Old Irving Park' OR T1.neighborhood_name = 'The Villa' | 8,736 | |
chicago_crime | How many crime cases have been classified as "Weapons Violation" by the FBI? | "Weapons Violation" is the title of crime; crime cases refers to report_no; | SELECT SUM(CASE WHEN T2.title = 'Weapons Violation' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN FBI_Code AS T2 ON T1.fbi_code_no = T2.fbi_code_no | 8,737 | |
chicago_crime | Please list any three criminal sexual assault cases against persons where the criminals have been arrested. | "Criminal Sexual Assault" is the title of crime; against person refers to crime_against = 'Persons'; criminals have been arrested refers to arrest = 'TRUE'; cases refers to case_number | SELECT T2.case_number FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T1.title = 'Criminal Sexual Assault' AND T2.arrest = 'TRUE' AND T1.crime_against = 'Persons' LIMIT 3 | 8,738 | |
chicago_crime | Please state the district name where incident number JB106545 took place. | incident number JB106545 refers to case_number = 'JB106545' | SELECT T1.case_number FROM Crime AS T1 INNER JOIN FBI_Code AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T2.title = 'Criminal Sexual Assault' AND T2.crime_against = 'Persons' AND T1.arrest = 'TRUE' LIMIT 3 | 8,739 | |
chicago_crime | What is the general description for case number JB106010? | general description refers to primary_description | SELECT T1.primary_description FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.case_number = 'JB106010' | 8,740 | |
chicago_crime | Please name three communities that experience the fraud incident. | communities refers to community_area_name; 'Fraud Incident' is the title of crime | SELECT T3.community_area_name FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.title = 'Criminal Sexual Assault' LIMIT 3 | 8,741 | |
chicago_crime | What was the major type of crime that happened in the Rogers Park community area? | "Rogers Park" is the community_area_name; major type of crime refers to title | SELECT T1.fbi_code_no, T1.title FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.community_area_name = 'Rogers Park' GROUP BY T1.fbi_code_no, T1.title | 8,742 | |
chicago_crime | At which district did the multiple homicide case number JB120039 occurred? | multiple homicide refers to Count(case_number) > 1; district refers to district_name | SELECT T1.district_no, T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T2.case_number = 'JB120039' GROUP BY T1.district_no, T1.district_name | 8,743 | |
chicago_crime | What is the percentage of crime cases that have been classified as "drug abuse" by the FBI and happened on the street? | "Drug Abuse" is the title of crime; happened on the street refers to location_description = 'STREET'; percentage = Divide (Count(fbi_code_no where location_description = 'STREET'), Count(fbi_code_no)) * 100 | SELECT CAST(SUM(CASE WHEN T2.title = 'Drug Abuse' AND T1.location_description = 'STREET' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.fbi_code_no) FROM Crime AS T1 INNER JOIN FBI_Code AS T2 ON T1.fbi_code_no = T2.fbi_code_no | 8,744 | |
chicago_crime | Provide the ward number with the highest population. | highest population refers to Max(Population); ward number refers to ward_no | SELECT ward_no FROM Ward ORDER BY Population DESC LIMIT 1 | 8,745 | |
chicago_crime | What is the beat and location description of the case JB112212? | case JB112212 refers to case_number = 'JB112212' | SELECT beat, location_description FROM Crime WHERE case_number = 'JB112212' | 8,746 | |
chicago_crime | Give the FBI code for the crime described by "The killing of one human being by another." | "The killing of one human being by another" is the description; FBI code refers to fbi_code_no | SELECT fbi_code_no FROM FBI_Code WHERE description = 'The killing of one human being by another.' | 8,747 | |
chicago_crime | Provide at least 5 ward office addresses associated with the crimes that happened in the community of Montclare. | "Montclare" is the community_area_name | SELECT T3.ward_office_address FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN Ward AS T3 ON T2.ward_no = T3.ward_no WHERE T1.community_area_name = 'Montclare' GROUP BY T3.ward_office_address LIMIT 5 | 8,748 | |
chicago_crime | List down the district's commander associated with the crime that happened at the yard and has a beat of 532. | beat of 532 refers to beat = 532; happened in the Yard refers to location_description = 'YARD'; district commander refers to commander | SELECT T2.address, T2.commander FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.location_description = 'YARD' AND T1.beat = 532 | 8,749 | |
chicago_crime | What is the neighborhood name in the community area of Lake View? | "Lake View" is the community_area_name | SELECT T2.neighborhood_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.community_area_name = 'Lake View' | 8,750 | |
chicago_crime | Name the neighborhood of the community area in crime with report number 23843? | neighborhood refers to neighborhood_name; '23778' is the report_no | SELECT T3.neighborhood_name FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN Neighborhood AS T3 ON T2.community_area_no = T3.community_area_no WHERE T2.report_no = 23778 | 8,751 | |
chicago_crime | What is the FBI description of the crime for report number 23778? | "23778" is the report_no; FBI description refers to description | SELECT T1.description FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T2.report_no = 23843 | 8,752 | |
chicago_crime | List down the report number of crimes associated with the district commander named Jill M. Stevens. | report number refers report_no; 'Jill M. Stevens" is the commander | SELECT SUM(CASE WHEN T1.commander = 'Jill M. Stevens' THEN 1 ELSE 0 END) FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no | 8,753 | |
chicago_crime | Among the crimes happened in the neighborhood called "Avalon Park", what is the percentage of crimes that happened inside the house? | "Avalon Park" is the neghborhood_name; happened inside the house refers to location_description = 'HOUSE'; percentage = Divide (Count(location_description = 'HOUSE'), Count(location_description)) * 100 | SELECT CAST(SUM(CASE WHEN T2.location_description = 'HOUSE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.location_description) AS persent FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN Neighborhood AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.neighborhood_name = 'Avalon Park' | 8,754 | |
chicago_crime | What is the full name of the alderman of ward no.21? | full name of alderman refers to alderman_first_name, alderman_last_name, alderman_name_suffix | SELECT alderman_first_name, alderman_last_name, alderman_name_suffix FROM Ward WHERE ward_no = 21 | 8,755 | |
chicago_crime | What is the ward ID of the most crowded ward? | most crowded ward refers to Max(Population) | SELECT ward_no FROM Ward ORDER BY Population DESC LIMIT 1 | 8,756 | |
chicago_crime | How many incidents have the general description of "ASSAULT" in the IUCR classification? | general description refers to primary_description; 'ASSAULT' is the primary_description; incidents refers to iucr_no | SELECT COUNT(*) FROM IUCR WHERE primary_description = 'ASSAULT' | 8,757 | |
chicago_crime | How many incidents are considered "severe" in the IUCR classification? | severe refers to index_code = 'I'; incidents refers to iucr_no | SELECT COUNT(*) FROM IUCR WHERE index_code = 'I' | 8,758 | |
chicago_crime | Among the crimes with no arrest made, how many of them happened in the ward represented by alderman Pat Dowell? | no arrest has been made refers to arrest = 'FALSE' | SELECT SUM(CASE WHEN T1.alderman_last_name = 'Dowell' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.arrest = 'FALSE' AND T1.alderman_first_name = 'Pat' | 8,759 | |
chicago_crime | Which alderman represents the ward with the most number of crimes in January, 2018? Please give his or her full name. | in January 2018 refers to Substr(date, 1, 1) = '1' AND Substr(date, 5, 4) = '2018'; ward with the most number of crime refers to Max (Count(ward_no)); full name refers to alderman_first_name, alderman_last_name, alderman_name_suffix | SELECT T1.ward_no, T1.alderman_first_name, T1.alderman_last_name, T1.alderman_name_suffix FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE SUBSTR(T2.date, 1, 1) = '1' AND SUBSTR(T2.date, 5, 4) = '2018' GROUP BY T1.ward_no ORDER BY COUNT(T1.ward_no) DESC LIMIT 1 | 8,760 | |
chicago_crime | Among the crimes in the ward with the most population, how many of them are cases of domestic violence? | most population refers to Max(Population); domestic violence refers to domestic = 'TRUE' | SELECT COUNT(T1.ward_no) AS num FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.domestic = 'TRUE' ORDER BY T1.Population = ( SELECT Population FROM Ward ORDER BY Population DESC LIMIT 1 ) | 8,761 | |
chicago_crime | Please list the location coordinates of all the incidents that had happened in the ward represented by alderman Pat Dowell. | location coordinates refers to latitude, longitude | SELECT T2.latitude, T2.longitude FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T1.alderman_first_name = 'Pat' AND T1.alderman_last_name = 'Dowell' AND T2.latitude IS NOT NULL AND T2.longitude IS NOT NULL | 8,762 | |
chicago_crime | The ward represented by which alderman had more incidents in January, 2018, Pat Dowell or Sophia King? | January, 2018 refers to Substr(date, 1, 1) = '1' AND Substr(date, 5, 4) = '2018'; had more incidents refers to Max(Count(ward_no)) | SELECT T1.alderman_first_name, T1.alderman_last_name, COUNT(T1.ward_no) AS num FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE (SUBSTR(T2.date, 1, 1) = '1' AND SUBSTR(T2.date, 5, 4) = '2018' AND T1.alderman_first_name = 'Pat' AND T1.alderman_last_name = 'Dowell') OR (T1.alderman_first_name = 'Sophia' AND T1.alderman_last_name = 'King') GROUP BY T1.ward_no | 8,763 | |
chicago_crime | Please list the case numbers of all the incidents with the generic description of "BATTERY" in the IUCR classification. | general description refers to primary_description; 'BATTERY' is the primary_description | SELECT T2.case_number FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.primary_description = 'BATTERY' | 8,764 | |
chicago_crime | Among the incidents with the generic description of "BATTERY" in the IUCR classification, how many of them do not have arrests made? | general description refers to primary_description; 'BATTERY' is the primary_description; do not have arrest made refers to arrest = 'FALSE' | SELECT SUM(CASE WHEN T2.arrest = 'FALSE' THEN 1 ELSE 0 END) FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.primary_description = 'BATTERY' | 8,765 | |
chicago_crime | Please list the case numbers of all the crimes whose short description of the kind of crime is "Homicide 1st & 2nd Degree" in the FBI classification. | "Homicide 1st & 2nd Degree" is the title | SELECT T2.case_number FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T1.title = 'Homicide 1st & 2nd Degree' | 8,766 | |
chicago_crime | Among the incidents in January, 2018, how many of them were stated "against Property" in the FBI classification? | in January 2018 refers to Substr(date, 1, 1) = '1' AND Substr(date, 5, 4) = '2018'; against property refers to crime_against = 'Property' | SELECT SUM(CASE WHEN SUBSTR(T2.date, 5, 4) = '2018' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T1.crime_against = 'Property' AND SUBSTR(T2.date, 1, 1) = '1' | 8,767 | |
chicago_crime | District commander Robert A. Rubio was responsible for how many incidents in January, 2018? | in January 2018 refers to Substr(date, 1, 1) = '1' AND Substr(date, 5, 4) = '2018' | SELECT SUM(CASE WHEN SUBSTR(T2.date, 5, 4) = '2018' THEN 1 ELSE 0 END) FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.commander = 'Robert A. Rubio' AND SUBSTR(T2.date, 1, 1) = '1' | 8,768 | |
chicago_crime | Which district commander was responsible for more incidents in January, 2018, Robert A. Rubio or Glenn White? | in January 2018 refers to Substr(date, 1, 1) = '1' AND Substr(date, 5, 4) = '2018'; 'Robert A. Rubio' and 'Glenn White' are both commander; responsible for more incident refers to Max(count(ward_no)) | SELECT T1.commander FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.commander IN ('Robert A. Rubio', 'Glenn White') AND SUBSTR(T2.date, 1, 1) = '1' AND SUBSTR(T2.date, 5, 4) = '2018' GROUP BY T1.commander | 8,769 | |
chicago_crime | Please list the blocks where all the incidents in the district commanded by Robert A. Rubio took place. | "Robert A. Rubio" is the commander | SELECT T2.block FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.commander = 'Robert A. Rubio' | 8,770 | |
chicago_crime | What is the average number of incidents per month in 2018 in the ward with the most population? | in 2018 refers to date like '%2018%'; ward with most population refers to Max(Population); average number of incident per month refers to Divide(Count(ward_no), 12) | SELECT COUNT(T1.ward_no) / 12 AS average FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.date LIKE '%2018%' AND T1.Population = ( SELECT MAX(T1.Population) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.date LIKE '%2018%' ) | 8,771 | |
chicago_crime | Among all the incidents with no arrest made, what is the percentage of them having a generic description of "BATTERY" in the IUCR classification? | incident with no arrest made refers to arrest = 'FALSE'; general description refers to primary_description; "BATTERY" is the primary_description; percentage = Divide (Count(iucr_no where primary_description = 'BATTERY'), Count(iucr_no)) * 100 | SELECT CAST(SUM(CASE WHEN T1.primary_description = 'BATTERY' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*)FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.arrest = 'FALSE' | 8,772 | |
food_inspection | How many restaurants' owners are in California? | restaurants' owners in California refer to owner_state = 'CA'; | SELECT COUNT(owner_state) FROM businesses WHERE owner_state = 'CA' | 8,773 | |
food_inspection | How many restaurants have met all requirements in the inspection? | met all requirements in the inspection refers to score = 100; | SELECT COUNT(score) FROM inspections WHERE score = 100 | 8,774 | |
food_inspection | Among the inspections carried out in 2016, how many of them are routine? | inspections carried out in 2016 refer to YEAR(date) = 2016; routine inspections refer to type = 'Routine - Unscheduled'; | SELECT COUNT(`date`) FROM inspections WHERE STRFTIME('%Y', `date`) = '2016' AND type = 'Routine - Unscheduled' | 8,775 | |
food_inspection | Please list the names of all the restaurants that have met all requirements in one inspection. | met all requirements refers to inspections where score = 100; | SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100 | 8,776 | |
food_inspection | Among the restaurants being inspected in 2016, how many of them are in San Francisco? | inspected in 2016 refers to YEAR(date) = 2016; San Francisco refers to city in ('San Francisco', 'SF' ,'S.F.', 'SAN FRANCISCO'); | SELECT COUNT(DISTINCT T2.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T2.city IN ('San Francisco', 'SAN FRANCISCO', 'SF', 'S.F.') | 8,777 | |
food_inspection | What was the type of inspection Tiramisu Kitchen had on 2014/1/14? | Tiramisu Kitchen is the name of the business; inspection on 2014/1/14 refers to date = '2014-01-14'; | SELECT T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2014-01-14' AND T2.name = 'Tiramisu Kitchen' | 8,778 | |
food_inspection | How many low risk violations were found in the inspection on 2014/1/14 for Tiramisu Kitchen? | Tiramisu Kitchen is the name of the business; inspection on 2014/1/14 refers to date = '2014-01-14'; low risk violations refer to risk_category = 'Low Risk'; | SELECT COUNT(T1.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2014-01-14' AND T2.name = 'Tiramisu Kitchen' AND T1.risk_category = 'Low Risk' | 8,779 | |
food_inspection | Please list the names of the restaurants that had a low risk violation in inspections in 2014. | inspection in 2014 refers to year(date) = 2014; low risk violations refer to risk_category = 'Low Risk'; | SELECT DISTINCT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2014' AND T1.risk_category = 'Low Risk' | 8,780 | |
food_inspection | What is the description of the low risk violation of Tiramisu Kitchen on 2014/1/14? | Tiramisu Kitchen is the name of the business; 2014/1/14 refers to date = '2014-01-14'; low risk violations refer to risk_category = 'Low Risk'; | SELECT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2014-01-14' AND T2.name = 'Tiramisu Kitchen' AND T1.risk_category = 'Low Risk' | 8,781 | |
food_inspection | Please list the descriptions of all the high risk violations of Tiramisu Kitchen. | Tiramisu Kitchen is the name of the business; high risk violations refer to risk_category = 'High Risk'; | SELECT DISTINCT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T2.name = 'Tiramisu Kitchen' | 8,782 | |
food_inspection | How many routine inspections did Tiramisu Kitchen have? | Tiramisu Kitchen is the name of the business; routine inspections refer to type = 'Routine - Unscheduled'; | SELECT COUNT(T1.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.type = 'Routine - Unscheduled' AND T2.name = 'Tiramisu Kitchen' | 8,783 | |
food_inspection | Among the routine inspections of Tiramisu Kitchen, how many of them have a score of over 70? | Tiramisu Kitchen is the name of the business; routine inspections refer to type = 'Routine - Unscheduled'; score of over 70 refers to score > 70; | SELECT COUNT(T2.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen' AND T1.type = 'Routine - Unscheduled' AND T1.score > 70 | 8,784 | |
food_inspection | Which restaurant had more low risk violation in inspections, Tiramisu Kitchen or OMNI S.F. Hotel - 2nd Floor Pantry? | Tiramisu Kitchen and OMNI S.F. Hotel - 2nd Floor Pantry are names of the business; more low risk violations refer to MAX(COUNT(risk_category = 'Low Risk')); | SELECT CASE WHEN SUM(CASE WHEN T2.name = 'OMNI S.F. Hotel - 2nd Floor Pantry' THEN 1 ELSE 0 END) > SUM(CASE WHEN T2.name = 'Tiramisu Kitchen' THEN 1 ELSE 0 END) THEN 'OMNI S.F. Hotel - 2nd Floor Pantry' ELSE 'Tiramisu Kitchen' END AS result FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'Low Risk' | 8,785 | |
food_inspection | How many high risk violations do the restaurants in San Francisco have in total? | restaurants in San Francisco refer to business_id where city in ('San Francisco', 'SF', 'S.F.', 'SAN FRANCISCO'); high risk violations refer to risk_category = 'High Risk'; | SELECT COUNT(T2.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.city IN ('San Francisco', 'SF', 'S.F.', 'SAN FRANCISCO') AND T1.risk_category = 'High Risk' | 8,786 | |
food_inspection | Which restaurant has the highest total number of high risk violations? | the highest total number of high risk violations refer to MAX(COUNT(risk_category = 'High Risk')); | SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' GROUP BY T2.name ORDER BY COUNT(T2.name) DESC LIMIT 1 | 8,787 | |
food_inspection | What is the average scores of Tiramisu Kitchen in all inspections? | avg(score); | SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen' | 8,788 | |
food_inspection | Which business had the most number of inspections? Give the Id number for that business. | the most number of inspections refers to MAX(COUNT(business_id)); Id number for that business refers to business_id; | SELECT business_id FROM inspections GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1 | 8,789 | |
food_inspection | Tell the Id number of the business with the most number of violations. | Id number for that business refers to business_id; the most number of violations refers to MAX(COUNT(business_id)); | SELECT business_id FROM violations GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1 | 8,790 | |
food_inspection | Give the name of the business which met all the required standards during the unscheduled routine inspection on 2016/9/28. | met all the required standards refers to score = 100; unscheduled routine inspection on 2016/9/28 refers to type = 'Routine - Unscheduled' where date = '2016-09-28'; | SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100 AND T1.`date` = '2016-09-28' AND T1.type = 'Routine - Unscheduled' | 8,791 | |
food_inspection | Which business had the most number of high risk violations? Give the name of the business. | the most number of high risk violations refers to MAX(COUNT(business_id)) where risk_category = 'High'; | SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' GROUP BY T2.name ORDER BY COUNT(T2.name) DESC LIMIT 1 | 8,792 | |
food_inspection | How many kinds of violations did "Stacks Restaurant" have on 2016/10/4? | "Stacks Restaurant" is the name of the business; date = '2016-10-04'; | SELECT COUNT(DISTINCT T1.violation_type_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Stacks Restaurant' AND T1.`date` = '2016-10-04' | 8,793 | |
food_inspection | Give the description of the moderate risk violation which "Chez Fayala, Inc." had on 2016/7/1. | "Chez Fayala, Inc." is the name of the business; moderate risk violation refers to risk_category = 'Moderate Risk'; date = '2016-07-01'; | SELECT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Chez Fayala, Inc.' AND T1.`date` = '2016-07-01' AND T1.risk_category = 'Moderate Risk' | 8,794 | |
food_inspection | Which business had the lowest score for the unscheduled routine inspection on 2016/9/26? Give the name of the business. | the lowest score for unscheduled routine inspection refers to type = 'Routine - Unscheduled' where MIN(score); date = '2016-09-26'; | SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE score = ( SELECT MIN(score) FROM inspections WHERE `date` = '2016-09-26' AND type = 'Routine - Unscheduled' ) AND T1.`date` = '2016-09-26' AND T1.type = 'Routine - Unscheduled' | 8,795 | |
food_inspection | Provide the name of the business which had the most number of inspections because of complaint. | the most number of inspections because of complaint refers to type = 'Complaint' where MAX(business_id); | SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.type = 'Complaint' GROUP BY T2.name ORDER BY COUNT(T1.business_id) DESC LIMIT 1 | 8,796 | |
food_inspection | How many unscheduled routine inspections did "Soma Restaurant And Bar" have? | "Soma Restaurant And Bar" is the name of the business; unscheduled routine inspections refer to type = 'Routine - Unscheduled'; | SELECT COUNT(T1.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Soma Restaurant And Bar' AND T1.type = 'Routine - Unscheduled' | 8,797 | |
food_inspection | Give the address of the business with the most number of the low risk violations. | the most number of the low risk violations refers to MAX(COUNT(business_id)) where risk_category = 'Low Risk' ; | SELECT T2.address FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'Low Risk' GROUP BY T2.address ORDER BY COUNT(T1.business_id) DESC LIMIT 1 | 8,798 | |
food_inspection | Which business was the first one to get a low risk violation because of "Permit license or inspection report not posted"? Give the name of the business. | low risk violation because of "Permit license or inspection report not posted" refers to risk_category = 'Low Risk' where description = 'Permit license or inspection report not posted'; business was the first one refers to name where MIN(date); | SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = ( SELECT MIN(`date`) FROM violations WHERE risk_category = 'Low Risk' AND description = 'Permit license or inspection report not posted' ) AND T1.risk_category = 'Low Risk' AND T1.description = 'Permit license or inspection report not posted' | 8,799 |
Subsets and Splits