db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
chicago_crime | select sum(case when t1.community_area_name = 'woodlawn' then 1 else 0 end) from community_area as t1 inner join crime as t2 on t1.community_area_no = t2.community_area_no where t2.date like '%1/2018%' | Question: among the crimes in woodlawn, how many of them happened in january, 2018? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, cr... | among the crimes in woodlawn, how many of them happened in january, 2018? |
chicago_crime | select t1.community_area_name from community_area as t1 inner join crime as t2 on t1.community_area_no = t2.community_area_no where t1.community_area_name in ('woodlawn', 'lincoln square') and t2.date like '%1/2018%' group by t1.community_area_name order by count(t1.community_area_name) desc limit 1 | Question: more crimes happened in which community area in january, 2018, woodlawn or lincoln square? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title... | more crimes happened in which community area in january, 2018, woodlawn or lincoln square? |
chicago_crime | select t1.fax from district as t1 inner join crime as t2 on t1.district_no = t2.district_no where t2.date like '%1/2018%' group by t2.district_no order by count(case_number) desc limit 1 | Question: what is the fax number for the district with the most number of crimes in january, 2018? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, ... | what is the fax number for the district with the most number of crimes in january, 2018? |
chicago_crime | select cast(count(t1.report_no) as real) / count(t2.community_area_no) from crime as t1 inner join community_area as t2 on t1.community_area_no = t2.community_area_no where t2.side = 'central' | Question: what is the average number of crimes in a neighborhood in central chicago? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, c... | what is the average number of crimes in a neighborhood in central chicago? |
chicago_crime | select cast(sum(case when t2.district_name = 'central' then 1 else 0 end) as real) * 100 / count(t1.case_number) from crime as t1 inner join district as t2 on t1.district_no = t2.district_no | Question: among the crimes in all the districts in chicago, what is the percentage of them happening in the central district? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_C... | among the crimes in all the districts in chicago, what is the percentage of them happening in the central district? |
chicago_crime | select count(*) from community_area where side = 'far north ' | Question: how many community areas are in the far north side? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> i... | how many community areas are in the far north side? |
chicago_crime | select commander from district where district_name = 'morgan park' | Question: who is the commander of morgan park district? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr_no... | who is the commander of morgan park district? |
chicago_crime | select t1.district_name from district as t1 inner join crime as t2 on t1.district_no = t2.district_no where t2.case_number = 'jb100065' | Question: where did case no. jb100065 happen? give the name of the district. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_aga... | where did case no. jb100065 happen? give the name of the district. |
chicago_crime | select t2.district_name from crime as t1 inner join district as t2 on t1.district_no = t2.district_no where t1.longitude = '-87.63470194' and t1.latitude = '41.66236555' | Question: where is the coordinate (41.66236555, -87.63470194) located? give the name of the district. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, titl... | where is the coordinate (41.66236555, -87.63470194) located? give the name of the district. |
chicago_crime | select t1.commander from district as t1 inner join crime as t2 on t1.district_no = t2.district_no where t2.case_number = 'jb524952' | Question: give the name of the person who was responsible for case no.jb524952. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_... | give the name of the person who was responsible for case no.jb524952. |
chicago_crime | select sum(case when t2.secondary_description = 'simple' then 1 else 0 end) from crime as t1 inner join iucr as t2 on t1.iucr_no = t2.iucr_no where t1.date like '%9/8/2018%' and t2.primary_description = 'assault' | Question: how many simple assaults happened on 2018/9/8? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr_n... | how many simple assaults happened on 2018/9/8? |
chicago_crime | select t2.district_no from iucr as t1 inner join crime as t2 on t1.iucr_no = t2.iucr_no where t1.secondary_description = 'first degree murder' group by t2.district_no order by count(*) desc limit 1 | Question: which district had the most number of first degree murders? give the district number. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, des... | which district had the most number of first degree murders? give the district number. |
chicago_crime | select t2.iucr_no from crime as t1 inner join iucr as t2 on t1.iucr_no = t2.iucr_no where t1.case_number = 'jb296775' | Question: how severe was case jb296775? give the index code for severity. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_agains... | how severe was case jb296775? give the index code for severity. |
chicago_crime | select t3.community_area_name from iucr as t1 inner join crime as t2 on t1.iucr_no = t2.iucr_no inner join community_area as t3 on t2.community_area_no = t3.community_area_no where t1.primary_description = 'theft' and t1.secondary_description = 'pocket-picking' group by t2.community_area_no order by t2.case_number desc... | Question: give the name of the community area which had the most pocket-picking thefts. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description... | give the name of the community area which had the most pocket-picking thefts. |
chicago_crime | select t1.alderman_first_name, t1.alderman_last_name from ward as t1 inner join crime as t2 on t1.ward_no = t2.ward_no where t2.case_number = 'jb103470' | Question: who was the alderman of the legislative district where case no. jb103470 took place? give the full name. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_... | who was the alderman of the legislative district where case no. jb103470 took place? give the full name. |
chicago_crime | select t1.neighborhood_name from neighborhood as t1 inner join community_area as t2 on t1.community_area_no = t2.community_area_no where t2.community_area_name = 'west englewood' | Question: give the neighborhood name of west englewood community. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR ... | give the neighborhood name of west englewood community. |
chicago_crime | select sum(case when t1.community_area_name = 'roseland' then 1 else 0 end) from community_area as t1 inner join neighborhood as t2 on t1.community_area_no = t2.community_area_no | Question: how many different neighborhoods are there in roseland community? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_agai... | how many different neighborhoods are there in roseland community? |
chicago_crime | select description from crime as t1 inner join fbi_code as t2 on t1.fbi_code_no = t2.fbi_code_no where t1.case_number = 'jb134191' | Question: give the fbi code description of case no.jb134191. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iu... | give the fbi code description of case no.jb134191. |
chicago_crime | select sum(case when t1.community_area_name = 'north lawndale' then 1 else 0 end) from community_area as t1 inner join crime as t2 on t1.community_area_no = t2.community_area_no where t2.arrest = 'true' | Question: tell the number of cases with arrests in north lawndale community. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_aga... | tell the number of cases with arrests in north lawndale community. |
chicago_crime | select cast(sum(case when t2.secondary_description = '$500 and under' then 1 else 0 end) as real) * 100 / count(t1.case_number) from crime as t1 inner join iucr as t2 on t1.iucr_no = t2.iucr_no inner join community_area as t3 on t1.community_area_no = t3.community_area_no where t2.primary_description = 'theft' and t3.c... | Question: what is the percentage of under $500 thefts among all cases that happened in west englewood? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, tit... | what is the percentage of under $500 thefts among all cases that happened in west englewood? |
chicago_crime | select cast(sum(case when t3.title = 'larceny' then 1 else 0 end) as real) * 100 / count(t2.case_number) from community_area as t1 inner join crime as t2 on t1.community_area_no = t2.community_area_no inner join fbi_code as t3 on t2.fbi_code_no = t3.fbi_code_no where t1.community_area_name = 'edgewater' | Question: what is the percentage of larceny cases among all cases that happened in edgewater community? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, ti... | what is the percentage of larceny cases among all cases that happened in edgewater community? |
chicago_crime | select sum(case when date like '5/%/2018%' then 1 else 0 end) from crime where block = '018xx s komensky ave' | Question: how many crimes were committed at 018xx s komensky avein may 2018? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_aga... | how many crimes were committed at 018xx s komensky avein may 2018? |
chicago_crime | select community_area_name from community_area order by population desc limit 1 | Question: what is the name of the community with the highest population? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against... | what is the name of the community with the highest population? |
chicago_crime | select sum(case when location_description = 'abandoned building' then 1 else 0 end) from crime where date like '%2018%' and domestic = 'true' | Question: how many incidents of domestic violence occurred in an abandoned building in 2018? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descri... | how many incidents of domestic violence occurred in an abandoned building in 2018? |
chicago_crime | select sum(population) from community_area group by side order by sum(population) limit 1 | Question: what is the population of the district with the least population? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_agai... | what is the population of the district with the least population? |
chicago_crime | select sum(case when arrest = 'true' then 1 else 0 end) from crime where date like '%2018%' and location_description = 'animal hospital' and fbi_code_no = '08b' | Question: how many arrests were made in 2018 in an animal hospital under fbi code 08b? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description,... | how many arrests were made in 2018 in an animal hospital under fbi code 08b? |
chicago_crime | select description from fbi_code where crime_against = 'society' | Question: give the detailed description of all the crimes against society. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_again... | give the detailed description of all the crimes against society. |
chicago_crime | select t1.commander from district as t1 inner join crime as t2 on t1.district_no = t2.district_no inner join fbi_code as t3 on t2.fbi_code_no = t3.fbi_code_no where t3.title = 'disorderly conduct' and t2.fbi_code_no = 24 group by t2.fbi_code_no order by count(t1.district_no) desc limit 1 | Question: who is the commanding officer in the district with the highest number of disorderly conduct? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, tit... | who is the commanding officer in the district with the highest number of disorderly conduct? |
chicago_crime | select t2.title from crime as t1 inner join fbi_code as t2 on t1.fbi_code_no = t2.fbi_code_no order by t2.fbi_code_no desc limit 1 | Question: which crime was committed the most by criminals? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr... | which crime was committed the most by criminals? |
chicago_crime | select sum(case when t3.title = 'criminal sexual abuse' then 1 else 0 end) from district as t1 inner join crime as t2 on t1.district_no = t2.district_no inner join fbi_code as t3 on t2.fbi_code_no = t3.fbi_code_no where t1.district_name = 'albany park' and t2.arrest = 'true' and t2.location_description = 'apartment' | Question: in albany park, how many arrests were made in an apartment due to criminal sexual abuse? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, ... | in albany park, how many arrests were made in an apartment due to criminal sexual abuse? |
chicago_crime | select t2.latitude, t2.longitude from community_area as t1 inner join crime as t2 on t1.community_area_no = t2.community_area_no inner join fbi_code as t3 on t2.fbi_code_no = t3.fbi_code_no where t1.community_area_name = 'rogers park' and t3.title = 'robbery' and t3.fbi_code_no = 3 | Question: what is the precise location or coordinate where most of the robberies in rogers park occurred? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, ... | what is the precise location or coordinate where most of the robberies in rogers park occurred? |
chicago_crime | select sum(case when t2.arrest = 'true' then 1 else 0 end) from community_area as t1 inner join crime as t2 on t1.community_area_no = t2.community_area_no inner join iucr as t3 on t2.iucr_no = t3.iucr_no where t1.community_area_name = 'west garfield park' and t3.secondary_description = 'solicit on public way' and t3.pr... | Question: how many solicit on public way prostitution crimes were arrested in west garfield park? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, d... | how many solicit on public way prostitution crimes were arrested in west garfield park? |
chicago_crime | select count(t2.report_no) from ward as t1 inner join crime as t2 on t1.ward_no = t2.ward_no where t2.domestic = 'true' and t2.location_description = 'bar or tavern' order by t1.population desc limit 1 | Question: in the most populated ward, how many incidents of domestic violence were reported in a bar or tavern? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_cod... | in the most populated ward, how many incidents of domestic violence were reported in a bar or tavern? |
chicago_crime | select sum(case when t1.community_area_name = 'near north side' then 1 else 0 end) from community_area as t1 inner join neighborhood as t2 on t1.community_area_no = t2.community_area_no | Question: how many neighborhoods are there in near north side? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> ... | how many neighborhoods are there in near north side? |
chicago_crime | select sum(case when t2.arrest = 'true' then 1 else 0 end) from ward as t1 inner join crime as t2 on t1.ward_no = t2.ward_no where t1.alderman_first_name = 'walter' and t1.alderman_last_name = 'burnett' and alderman_name_suffix = 'jr.' and t2.domestic = 'true' | Question: out of all the incidents of domestic violence reported at the ward represented by alderman walter burnett jr., how many were arrested? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, ... | out of all the incidents of domestic violence reported at the ward represented by alderman walter burnett jr., how many were arrested? |
chicago_crime | select t3.title from community_area as t1 inner join crime as t2 on t1.community_area_no = t2.community_area_no inner join fbi_code as t3 on t2.fbi_code_no = t3.fbi_code_no group by t3.title order by t1.population asc, t3.fbi_code_no desc limit 1 | Question: what is the short description of the crime committed the most by criminals in the least populated community? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> ... | what is the short description of the crime committed the most by criminals in the least populated community? |
chicago_crime | select t1.ward_office_address from ward as t1 inner join crime as t2 on t1.ward_no = t2.ward_no where t2.block = '010xx w lake st' group by t1.ward_office_address | Question: what is the legislative district's office address where 010xx w lake st is located? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descr... | what is the legislative district's office address where 010xx w lake st is located? |
chicago_crime | select t3.community_area_name from crime as t1 inner join iucr as t2 on t1.iucr_no = t2.iucr_no inner join community_area as t3 on t1.community_area_no = t3.community_area_no where t2.primary_description = 'prostitution' group by t1.iucr_no order by t1.case_number desc limit 1 | Question: what is the name of the community that has the highest number of crimes related to prostitution? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no,... | what is the name of the community that has the highest number of crimes related to prostitution? |
chicago_crime | select sum(case when t1.alderman_last_name = 'burke' then 1 else 0 end) from ward as t1 inner join crime as t2 on t1.ward_no = t2.ward_no inner join fbi_code as t3 on t2.fbi_code_no = t3.fbi_code_no where t3.title = 'vandalism' and t2.arrest = 'true' and t1.alderman_first_name = 'edward' | Question: how many vandalisms were arrested in the ward represented by edward burke? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, c... | how many vandalisms were arrested in the ward represented by edward burke? |
chicago_crime | select count(*) from crime where date like '5/%/2018%' and domestic = 'true' | Question: how many domestic violence cases were reported in may 2018? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. I... | how many domestic violence cases were reported in may 2018? |
chicago_crime | select index_code from iucr where primary_description = 'homicide' | Question: list the iucr numbers and index status of homicide incidents. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against.... | list the iucr numbers and index status of homicide incidents. |
chicago_crime | select commander, email from district where district_name = 'chicago lawn' | Question: provide the responsible person and his/her email address of chicago lawn. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, cr... | provide the responsible person and his/her email address of chicago lawn. |
chicago_crime | select alderman_name_suffix, alderman_first_name, alderman_last_name from ward order by population desc limit 1 | Question: what is the alderman's full name of the most crowded ward? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IU... | what is the alderman's full name of the most crowded ward? |
chicago_crime | select community_area_name from community_area where side = 'northwest' | Question: list the community area names in the northwest. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr_... | list the community area names in the northwest. |
chicago_crime | select title, description from fbi_code where crime_against = 'persons' | Question: list down the titles and descriptions of the crimes cases against persons. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, c... | list down the titles and descriptions of the crimes cases against persons. |
chicago_crime | select t1.secondary_description, t2.latitude, t2.longitude from iucr as t1 inner join crime as t2 on t1.iucr_no = t2.iucr_no where t2.iucr_no = 142 | Question: describe the specific description and case locations under iucr 142. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_a... | describe the specific description and case locations under iucr 142. |
chicago_crime | select sum(case when t2.alderman_last_name = 'reilly' then 1 else 0 end) from crime as t1 inner join ward as t2 on t1.ward_no = t2.ward_no where t2.alderman_name_suffix is null and t2.alderman_first_name = 'brendan' and date like '10/7/2018%' | Question: how many crimes were handled by brendan reilly on 7th october 2018? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_ag... | how many crimes were handled by brendan reilly on 7th october 2018? |
chicago_crime | select sum(case when t1.arrest = 'true' then 1 else 0 end) from crime as t1 inner join district as t2 on t1.district_no = t2.district_no where t2.district_name = 'englewood' and t1.location_description = 'restaurant' | Question: how many cases have been arrested among the crimes that happened in the restaurant of englewood? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no,... | how many cases have been arrested among the crimes that happened in the restaurant of englewood? |
chicago_crime | select t2.case_number, t3.alderman_first_name, t3.alderman_last_name, t1.district_name from district as t1 inner join crime as t2 on t1.district_no = t2.district_no inner join ward as t3 on t2.ward_no = t3.ward_no where t2.block = '0000x n francisco ave' group by t2.case_number, t3.alderman_first_name, t3.alderman_last... | Question: provide case numbers, aldermen's full names, and district names of the crimes that happened in 0000x n francisco ave. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI... | provide case numbers, aldermen's full names, and district names of the crimes that happened in 0000x n francisco ave. |
chicago_crime | select sum(case when t1.title = 'misc non-index offense' then 1 else 0 end) from fbi_code as t1 inner join crime as t2 on t2.fbi_code_no = t1.fbi_code_no | Question: how many crimes were misc non-index offense? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr_no,... | how many crimes were misc non-index offense? |
chicago_crime | select t2.neighborhood_name from community_area as t1 inner join neighborhood as t2 on t2.community_area_no = t1.community_area_no where t1.community_area_name = 'douglas' | Question: list down the neighborhood areas of douglas. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr_no,... | list down the neighborhood areas of douglas. |
chicago_crime | select cast(count(t2.report_no) as real) / 12 from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no group by t1.community_area_no having count(t1.population) order by count(t1.population) limit 1 | Question: calculate the average crime rate per month in the highest populous area. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, cri... | calculate the average crime rate per month in the highest populous area. |
chicago_crime | select cast(count(case when t3.title = 'larceny' then t2.report_no end) as real) * 100 / count(t2.report_no) from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no inner join fbi_code as t3 on t3.fbi_code_no = t2.fbi_code_no where t1.side = 'central' | Question: among the crimes in the central, calculate the percentage of larceny incidents. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descripti... | among the crimes in the central, calculate the percentage of larceny incidents. |
chicago_crime | select t2.location_description, t1.alderman_first_name, t1.alderman_last_name, t1.alderman_name_suffix from ward as t1 inner join crime as t2 on t2.ward_no = t1.ward_no inner join iucr as t3 on t3.iucr_no = t2.iucr_no where t3.primary_description = 'arson' and t3.secondary_description = 'by explosive' | Question: list the location descriptions and aldermen's full names of the arson by explosive. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descr... | list the location descriptions and aldermen's full names of the arson by explosive. |
chicago_crime | select t2.date, t2.latitude, t2.longitude from iucr as t1 inner join crime as t2 on t2.iucr_no = t1.iucr_no where t1.primary_description = 'deceptive practice' and t1.secondary_description = 'unlawful use of recorded sound' | Question: provide the occurrence date and location of the deceptive practice due to the unlawful use of recorded sound. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code ->... | provide the occurrence date and location of the deceptive practice due to the unlawful use of recorded sound. |
chicago_crime | select count(t2.report_no) from district as t1 inner join crime as t2 on t2.district_no = t1.district_no inner join fbi_code as t3 on t3.fbi_code_no = t2.fbi_code_no where t3.title = 'criminal sexual assault' and t1.commander = 'adnardo gutierrez' and t2.location_description = 'residence' | Question: among the criminal sexual assaults in the district of adnardo gutierrez, how many cases happened in the residence? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Co... | among the criminal sexual assaults in the district of adnardo gutierrez, how many cases happened in the residence? |
chicago_crime | select cast(count(case when t2.arrest = 'true' then t2.report_no end) as real) * 100 / count(t2.report_no) from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no where t1.community_area_name = 'west pullman' and t2.domestic = 'true' | Question: how many percent of domestic violence cases were arrested in west pullman? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, c... | how many percent of domestic violence cases were arrested in west pullman? |
chicago_crime | select cast(count(case when t1.domestic = 'true' then t1.report_no end) as real) * 100 / count(t1.report_no), count(case when t1.domestic = 'true' and t1.location_description = 'bank' then t1.report_no end) as 'number' from crime as t1 inner join ward as t2 on t2.ward_no = t1.ward_no where t2.alderman_first_name = 'chr... | Question: calculate the percentage of the domestic violence cases handled by christopher taliaferro. among them, list report numbers of cases that happened in the bank. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, comman... | calculate the percentage of the domestic violence cases handled by christopher taliaferro. among them, list report numbers of cases that happened in the bank. |
chicago_crime | select count(*) from ward where alderman_first_name = 'james' | Question: how many aldermen have 'james' as their first name? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> i... | how many aldermen have 'james' as their first name? |
chicago_crime | select count(*) from crime where date like '1/1/2018%' | Question: how many crimes are commited on january 1, 2018? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr... | how many crimes are commited on january 1, 2018? |
chicago_crime | select avg(population) from community_area where side = 'west ' | Question: calculate the average population of community areas in the west side. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_... | calculate the average population of community areas in the west side. |
chicago_crime | select t2.report_no from ward as t1 inner join crime as t2 on t2.ward_no = t1.ward_no inner join community_area as t3 on t3.community_area_no = t2.community_area_no where t1.alderman_first_name = 'edward' and t1.alderman_last_name = 'burke' order by t2.beat desc, t3.population desc limit 1 | Question: among the cases reported in the ward with edward burke as the alderman and happened in the community area with the highest population, provide the report number of the crime with the highest beat. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, di... | among the cases reported in the ward with edward burke as the alderman and happened in the community area with the highest population, provide the report number of the crime with the highest beat. |
chicago_crime | select sum(case when t2.location_description = 'street' then 1 else 0 end) from fbi_code as t1 inner join crime as t2 on t2.fbi_code_no = t1.fbi_code_no where t1.title = 'homicide 1st & 2nd degree' | Question: how many of the crimes that happened in the street have fbi title 'homicide 1st & 2nd degree'? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, t... | how many of the crimes that happened in the street have fbi title 'homicide 1st & 2nd degree'? |
chicago_crime | select t2.alderman_first_name, t2.alderman_last_name from crime as t1 inner join ward as t2 on t2.ward_no = t1.ward_no where t1.report_no = 23769 | Question: who is the alderman in the ward associated with the crime with report number 23769? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descr... | who is the alderman in the ward associated with the crime with report number 23769? |
chicago_crime | select t2.case_number from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no where t1.community_area_name = 'lincoln square' and t2.domestic = 'true' | Question: list the case numbers of domestic violence crimes reported in lincoln square. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description... | list the case numbers of domestic violence crimes reported in lincoln square. |
chicago_crime | select t1.case_number from crime as t1 inner join ward as t2 on t2.ward_no = t1.ward_no where t1.location_description = 'apartment' and t2.ward_office_address = '1958 n. milwaukee ave.' | Question: among the crimes reported to the ward located at 1958 n. milwaukee ave., list down the report number of the crimes happened inside the apartment. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, p... | among the crimes reported to the ward located at 1958 n. milwaukee ave., list down the report number of the crimes happened inside the apartment. |
chicago_crime | select sum(case when t2.beat < 1000 then 1 else 0 end) from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no where t1.community_area_name = 'bridgeport' | Question: what is the total number of crimes that happened in bridgeport with beat less than 1000? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, ... | what is the total number of crimes that happened in bridgeport with beat less than 1000? |
chicago_crime | select sum(case when t1.population > 60000 then 1 else 0 end) from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no where t1.side = 'far north ' | Question: list the report number of crimes reported in a community area in the far north side with a population greater than 60,000. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter... | list the report number of crimes reported in a community area in the far north side with a population greater than 60,000. |
chicago_crime | select sum(case when t1.crime_against = 'property' 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 t3.community_area_name = 'riverdale' | Question: list the report number of crimes against property happened in riverdale. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, cri... | list the report number of crimes against property happened in riverdale. |
chicago_crime | select sum(case when t2.domestic = 'true' then 1 else 0 end) from ward as t1 inner join crime as t2 on t2.ward_no = t1.ward_no where t1.ward_email = 'ward13@cityofchicago.org' | Question: how many domestic violence cases were brought in the ward that uses 'ward13@cityofchicago.org'? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, ... | how many domestic violence cases were brought in the ward that uses 'ward13@cityofchicago.org'? |
chicago_crime | select t1.address from district as t1 inner join crime as t2 on t2.district_no = t1.district_no where t2.case_number = 'jb107731' | Question: what is the district address associated with the case jb107731? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_agains... | what is the district address associated with the case jb107731? |
chicago_crime | select 1.0 * sum(case when t1.population > 50000 then t2.beat else 0 end) as sum from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no where t1.side = 'central' | Question: calculate the total beat of the crimes reported in a community area in the central side with population of 50,000 and above. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitt... | calculate the total beat of the crimes reported in a community area in the central side with population of 50,000 and above. |
chicago_crime | select t2.case_number from fbi_code as t1 inner join crime as t2 on t2.fbi_code_no = t1.fbi_code_no where t2.date like '6/%/2018%' and t1.crime_against = 'society' | Question: list the case number of crimes against society that happened in june 2018. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, c... | list the case number of crimes against society that happened in june 2018. |
chicago_crime | select cast(count(case when t2.domestic = 'true' then t2.domestic end) as real) * 100 / count(t2.domestic) from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no group by t1.community_area_no having count(t1.population) order by count(t1.population) desc limit 1 | Question: among the crimes located in the community area with the highest population, what is the percentage of domestic violence? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. ... | among the crimes located in the community area with the highest population, what is the percentage of domestic violence? |
chicago_crime | select count(t1.report_no) from crime as t1 inner join ward as t2 on t1.ward_no = t2.ward_no where t2.population < 52000 and t1.beat > ( select avg(t1.beat) * 0.9 from crime as t1 inner join ward as t2 on t1.ward_no = t2.ward_no where t2.population < 52000 ) | Question: list the case number of the crimes in wards with population below 52000 that have beat greater than the 90% of the average beat of all crimes. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phon... | list the case number of the crimes in wards with population below 52000 that have beat greater than the 90% of the average beat of all crimes. |
chicago_crime | select community_area_name, side from community_area where side = 'far north ' and population between 50000 and 70000 | Question: please list the area name of the communities in the far north side, which has a population of more than 50000 but less than 70000. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty,... | please list the area name of the communities in the far north side, which has a population of more than 50000 but less than 70000. |
chicago_crime | select latitude, longitude from crime where location_description = 'alley' and arrest = 'true' group by latitude, longitude | Question: give the coordinate of the alleys where a crime was reported and an arrest was made. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, desc... | give the coordinate of the alleys where a crime was reported and an arrest was made. |
chicago_crime | select commander, email, phone from district where district_name = 'ogden' | Question: find the commander's name, email address, and phone number of the ogden district. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descrip... | find the commander's name, email address, and phone number of the ogden district. |
chicago_crime | select fbi_code_no, description from fbi_code where title = 'gambling' | Question: what is the fbi code and definition of gambling? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr... | what is the fbi code and definition of gambling? |
chicago_crime | select cast(count(case when index_code = 'i' then iucr_no else null end) as real) * 100 / count(iucr_no) from iucr | Question: among the crimes, what percentage are severe? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iucr_no... | among the crimes, what percentage are severe? |
chicago_crime | select t2.location_description from district as t1 inner join crime as t2 on t2.district_no = t1.district_no where t1.district_name = 'austin' group by t2.location_description order by count(t2.case_number) desc limit 1 | Question: what kind of location in austin reported the most number of crimes? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_ag... | what kind of location in austin reported the most number of crimes? |
chicago_crime | select cast(count(t1.ward_no) as real) / count(distinct t3.side) from ward as t1 inner join crime as t2 on t2.ward_no = t1.ward_no inner join community_area as t3 on t3.community_area_no = t2.community_area_no | Question: on average, how many community areas are there in a side? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUC... | on average, how many community areas are there in a side? |
chicago_crime | select t1.community_area_no from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no where t2.location_description = 'street' group by t1.community_area_no order by count(t2.location_description) desc limit 1 | Question: which community area has the highest number of crimes reported on the street? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description... | which community area has the highest number of crimes reported on the street? |
chicago_crime | select cast(count(t2.report_no) as real) / count(distinct t1.district_name) from district as t1 inner join crime as t2 on t2.district_no = t1.district_no inner join iucr as t3 on t3.iucr_no = t2.iucr_no where t3.secondary_description = 'reckless homicide' | Question: what is the average number of reckless homicides that happened in a district? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description... | what is the average number of reckless homicides that happened in a district? |
chicago_crime | select t2.ward_office_address, t2.ward_office_phone from crime as t1 inner join ward as t2 on t2.ward_no = t1.ward_no where t1.arrest = 'false' group by t2.ward_office_address, t2.ward_office_phone order by count(t1.arrest) desc limit 1 | Question: find the ward office's address and phone number of the ward where the most crimes without arrest occurred. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fb... | find the ward office's address and phone number of the ward where the most crimes without arrest occurred. |
chicago_crime | select t1.case_number, t1.latitude, t1.longitude from crime as t1 inner join iucr as t2 on t2.iucr_no = t1.iucr_no where t2.secondary_description = 'child abduction' | Question: give the case number and coordinates of the places where child abduction is reported. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, des... | give the case number and coordinates of the places where child abduction is reported. |
chicago_crime | select t3.secondary_description from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no inner join iucr as t3 on t3.iucr_no = t2.iucr_no where t1.side = 'northwest ' group by t3.secondary_description order by count(*) desc limit 1 | Question: what is the most reported crime in the northwest side? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -... | what is the most reported crime in the northwest side? |
chicago_crime | select t2.community_area_no from crime as t1 inner join community_area as t2 on t2.community_area_no = t1.community_area_no where t1.domestic = 'true' group by t2.community_area_no order by count(t2.community_area_no) asc limit 1 | Question: find the community area where the least number of domestic crimes happened. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, ... | find the community area where the least number of domestic crimes happened. |
chicago_crime | select cast(count(case when t1.secondary_description like '%cannabis%' then t1.secondary_description end) as real) * 100 / count(t1.secondary_description) from iucr as t1 inner join crime as t2 on t2.iucr_no = t1.iucr_no inner join fbi_code as t3 on t3.fbi_code_no = t2.fbi_code_no where t3.title = 'drug abuse' | Question: in drug abuse crimes, what percentage is related to cannabis? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against.... | in drug abuse crimes, what percentage is related to cannabis? |
chicago_crime | select cast(count(t2.case_number) as real) / 28 from iucr as t1 inner join crime as t2 on t2.iucr_no = t1.iucr_no where t2.date like '2/%/2018%' and t1.index_code = 'n' | Question: what is the average number of less severe crimes reported a day in february of 2018? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, desc... | what is the average number of less severe crimes reported a day in february of 2018? |
chicago_crime | select t2.community_area_name, t2.population from crime as t1 inner join community_area as t2 on t2.community_area_no = t1.community_area_no inner join iucr as t3 on t3.iucr_no = t1.iucr_no where t3.iucr_no = ( select iucr_no from iucr where secondary_description = 'solicit for prostitute' group by iucr_no having count... | Question: list the name and population of the communities where more than average solicit for prostitutes were reported. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -... | list the name and population of the communities where more than average solicit for prostitutes were reported. |
chicago_crime | select count(case when t3.title = 'disorderly conduct' then t2.report_no end) * 100.0 / count(t2.report_no) as per from district as t1 inner join crime as t2 on t2.district_no = t1.district_no inner join fbi_code as t3 on t3.fbi_code_no = t2.fbi_code_no where t1.district_name = 'harrison' | Question: among the incidents reported in harrison, what percentage are disorderly conduct? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descrip... | among the incidents reported in harrison, what percentage are disorderly conduct? |
chicago_crime | select round(cast(count(case when t1.secondary_description = 'vehicular hijacking' then t1.iucr_no end) as real) / cast(count(distinct case when t1.secondary_description = 'vehicular hijacking' then t3.district_name end) as real) - cast(count(case when t1.secondary_description = 'aggravated vehicular hijacking' then t1... | Question: calculate the difference in the average number of vehicular hijackings and aggravated vehicular hijackings in the districts. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitt... | calculate the difference in the average number of vehicular hijackings and aggravated vehicular hijackings in the districts. |
chicago_crime | select count(*) from crime where longitude = '-87.72658001' | Question: how many crimes happened in longitude -8772658001? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> iu... | how many crimes happened in longitude -8772658001? |
chicago_crime | select secondary_description from iucr where primary_description = 'narcotics' group by secondary_description | Question: list all the crimes of the narcotic type that exist. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, crime_against. IUCR -> ... | list all the crimes of the narcotic type that exist. |
chicago_crime | select alderman_first_name from ward where population > 50000 | Question: what is the first name of the aldermen of wards with more than 50,000 inhabitants? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, descri... | what is the first name of the aldermen of wards with more than 50,000 inhabitants? |
chicago_crime | select t2.report_no from fbi_code as t1 inner join crime as t2 on t2.fbi_code_no = t1.fbi_code_no where t1.title = 'drug abuse' | Question: list crimes that the fbi has classified as drug abuse by their report number. | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description... | list crimes that the fbi has classified as drug abuse by their report number. |
chicago_crime | select sum(case when t3.district_name = 'calumet' then 1 else 0 end) 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 = 'weapons violation' | Question: how many weapons violation crimes have occurred in the calumet district? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, description, cri... | how many weapons violation crimes have occurred in the calumet district? |
chicago_crime | select t2.latitude, t2.longitude from community_area as t1 inner join crime as t2 on t2.community_area_no = t1.community_area_no where t1.community_area_name = 'belmont cragin' group by t2.latitude, t2.longitude | Question: what is the exact location of the crimes that occurred in the belmont cragin community? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_Code -> fbi_code_no, title, d... | what is the exact location of the crimes that occurred in the belmont cragin community? |
chicago_crime | select sum(case when t4.neighborhood_name = 'hermosa' then 1 else 0 end) from iucr as t1 inner join crime as t2 on t2.iucr_no = t1.iucr_no inner join community_area as t3 on t3.community_area_no = t2.community_area_no inner join neighborhood as t4 on t4.community_area_no = t3.community_area_no | Question: how many different types of crimes, according to the primary description, have occurred in the hermosa neighborhood? | Tables: Community_Area -> community_area_no, community_area_name, side, population. District -> district_no, district_name, address, zip_code, commander, email, phone, fax, tty, twitter. FBI_... | how many different types of crimes, according to the primary description, have occurred in the hermosa neighborhood? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.