input
stringlengths
236
16.9k
output
stringlengths
19
805
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Among the crimes in Woodlawn, how many of them happened in January, 2018?
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%';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- More crimes happened in which community area in January, 2018, Woodlawn or Lincoln Square?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the fax number for the district with the most number of crimes in January, 2018?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the average number of crimes in a neighborhood in Central Chicago?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Among the crimes in all the districts in Chicago, what is the percentage of them happening in the Central district?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many community areas are in the Far North side?
SELECT COUNT(*) FROM Community_Area WHERE side = 'Far North ';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Who is the commander of Morgan Park district?
SELECT commander FROM District WHERE district_name = 'Morgan Park';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Where did case No. JB100065 happen? Give the name of the district.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Where is the coordinate (41.66236555, -87.63470194) located? Give the name of the district.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Give the name of the person who was responsible for case No.JB524952.
SELECT T1.commander FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T2.case_number = 'JB524952';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many simple assaults happened on 2018/9/8?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Which district had the most number of first degree murders? Give the district number.
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How severe was case JB296775? Give the index code for severity.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Give the name of the community area which had the most pocket-picking thefts.
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 LIMIT 1;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Who was the alderman of the legislative district where case No. JB103470 took place? Give the full name.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Give the neighborhood name of West Englewood community.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many different neighborhoods are there in Roseland community?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Give the FBI code description of case No.JB134191.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Tell the number of cases with arrests in North Lawndale community.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the percentage of under $500 thefts among all cases that happened in West Englewood?
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.community_area_name = 'West Englewood';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the percentage of larceny cases among all cases that happened in Edgewater community?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many crimes were committed at 018XX S KOMENSKY AVEin May 2018?
SELECT SUM(CASE WHEN date LIKE '5/%/2018%' THEN 1 ELSE 0 END) FROM Crime WHERE block = '018XX S KOMENSKY AVE';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the name of the community with the highest population?
SELECT community_area_name FROM Community_Area ORDER BY population DESC LIMIT 1;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many incidents of domestic violence occurred in an abandoned building in 2018?
SELECT SUM(CASE WHEN location_description = 'ABANDONED BUILDING' THEN 1 ELSE 0 END) FROM Crime WHERE date LIKE '%2018%' AND domestic = 'TRUE';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the population of the district with the least population?
SELECT SUM(population) FROM Community_Area GROUP BY side ORDER BY SUM(population) LIMIT 1;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many arrests were made in 2018 in an animal hospital under FBI code 08B?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Give the detailed description of all the crimes against society.
SELECT description FROM FBI_Code WHERE crime_against = 'Society';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Who is the commanding officer in the district with the highest number of disorderly conduct?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Which crime was committed the most by criminals?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- In Albany Park, how many arrests were made in an apartment due to criminal sexual abuse?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the precise location or coordinate where most of the robberies in Rogers Park occurred?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many solicit on public way prostitution crimes were arrested in West Garfield Park?
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.primary_description = 'PROSTITUTION';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- In the most populated ward, how many incidents of domestic violence were reported in a bar or tavern?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many neighborhoods are there in Near North Side?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Out of all the incidents of domestic violence reported at the ward represented by alderman Walter Burnett Jr., how many were arrested?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the short description of the crime committed the most by criminals in the least populated community?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the legislative district's office address where 010XX W LAKE ST is located?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the name of the community that has the highest number of crimes related to prostitution?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many vandalisms were arrested in the ward represented by Edward Burke?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many domestic violence cases were reported in May 2018?
SELECT COUNT(*) FROM Crime WHERE date LIKE '5/%/2018%' AND domestic = 'TRUE';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List the IUCR numbers and index status of homicide incidents.
SELECT index_code FROM IUCR WHERE primary_description = 'HOMICIDE';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Provide the responsible person and his/her email address of Chicago Lawn.
SELECT commander, email FROM District WHERE district_name = 'Chicago Lawn';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the alderman's full name of the most crowded ward?
SELECT alderman_name_suffix, alderman_first_name, alderman_last_name FROM Ward ORDER BY population DESC LIMIT 1;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List the community area names in the Northwest.
SELECT community_area_name FROM Community_Area WHERE side = 'Northwest';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List down the titles and descriptions of the crimes cases against persons.
SELECT title, description FROM FBI_Code WHERE crime_against = 'Persons';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Describe the specific description and case locations under IUCR 142.
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many crimes were handled by Brendan Reilly on 7th October 2018?
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%';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many cases have been arrested among the crimes that happened in the restaurant of Englewood?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Provide case numbers, aldermen's full names, and district names of the crimes that happened in 0000X N FRANCISCO AVE.
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_name, T1.district_name;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many crimes were Misc Non-Index Offense?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List down the neighborhood areas of Douglas.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Calculate the average crime rate per month in the highest populous area.
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Among the crimes in the Central, calculate the percentage of larceny incidents.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List the location descriptions and aldermen's full names of the arson by explosive.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Provide the occurrence date and location of the deceptive practice due to the unlawful use of recorded sound.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Among the criminal sexual assaults in the district of Adnardo Gutierrez, how many cases happened in the residence?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many percent of domestic violence cases were arrested in West Pullman?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Calculate the percentage of the domestic violence cases handled by Christopher Taliaferro. Among them, list report numbers of cases that happened in the bank.
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 = 'Christopher' AND T2.alderman_last_name = 'Taliaferro';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many aldermen have "James" as their first name?
SELECT COUNT(*) FROM Ward WHERE alderman_first_name = 'James';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many crimes are commited on January 1, 2018?
SELECT COUNT(*) FROM Crime WHERE date LIKE '1/1/2018%';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Calculate the average population of community areas in the West side.
SELECT AVG(population) FROM Community_Area WHERE side = 'West ';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- 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.
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many of the crimes that happened in the street have FBI title "Homicide 1st & 2nd Degree"?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Who is the alderman in the ward associated with the crime with report number 23769?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List the case numbers of domestic violence crimes reported in Lincoln Square.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- 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.
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.';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the total number of crimes that happened in Bridgeport with beat less than 1000?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List the report number of crimes reported in a community area in the far north side with a population greater than 60,000.
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 ';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List the report number of crimes against property happened in Riverdale.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many domestic violence cases were brought in the ward that uses "[email protected]"?
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 = '[email protected]';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the district address associated with the case JB107731?
SELECT T1.address FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T2.case_number = 'JB107731';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Calculate the total beat of the crimes reported in a community area in the central side with population of 50,000 and above.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List the case number of crimes against society that happened in June 2018.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Among the crimes located in the community area with the highest population, what is the percentage of domestic violence?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- 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.
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 );
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- 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.
SELECT community_area_name, side FROM Community_Area WHERE side = 'Far North ' AND population BETWEEN 50000 AND 70000;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Give the coordinate of the alleys where a crime was reported and an arrest was made.
SELECT latitude, longitude FROM Crime WHERE location_description = 'ALLEY' AND arrest = 'TRUE' GROUP BY latitude, longitude;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Find the commander's name, email address, and phone number of the Ogden district.
SELECT commander, email, phone FROM District WHERE district_name = 'Ogden';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the FBI code and definition of Gambling?
SELECT fbi_code_no, description FROM FBI_Code WHERE title = 'Gambling';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Among the crimes, what percentage are severe?
SELECT CAST(COUNT(CASE WHEN index_code = 'I' THEN iucr_no ELSE NULL END) AS REAL) * 100 / COUNT(iucr_no) FROM IUCR;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What kind of location in Austin reported the most number of crimes?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- On average, how many community areas are there in a side?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Which community area has the highest number of crimes reported on the street?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the average number of reckless homicides that happened in a district?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Find the ward office's address and phone number of the ward where the most crimes without arrest occurred.
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Give the case number and coordinates of the places where child abduction is reported.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the most reported crime in the Northwest side?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Find the community area where the least number of domestic crimes happened.
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- In drug abuse crimes, what percentage is related to cannabis?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the average number of less severe crimes reported a day in February of 2018?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List the name and population of the communities where more than average solicit for prostitutes were reported.
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(iucr_no) > ( SELECT SUM(CASE WHEN secondary_description = 'SOLICIT FOR PROSTITUTE' THEN 1.0 ELSE 0 END) / COUNT(iucr_no) AS average FROM IUCR ) );
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Among the incidents reported in Harrison, what percentage are disorderly conduct?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- Calculate the difference in the average number of vehicular hijackings and aggravated vehicular hijackings in the districts.
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.iucr_no END) AS REAL) / CAST(COUNT(DISTINCT CASE WHEN T1.secondary_description = 'AGGRAVATED VEHICULAR HIJACKING' THEN T3.district_name END) AS REAL), 4) AS "difference" 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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many crimes happened in longitude -8772658001?
SELECT COUNT(*) FROM Crime WHERE longitude = '-87.72658001';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List all the crimes of the narcotic type that exist.
SELECT secondary_description FROM IUCR WHERE primary_description = 'NARCOTICS' GROUP BY secondary_description;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the first name of the aldermen of wards with more than 50,000 inhabitants?
SELECT alderman_first_name FROM Ward WHERE Population > 50000;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- List crimes that the FBI has classified as Drug Abuse by their report number.
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many weapons violation crimes have occurred in the Calumet district?
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';
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- What is the exact location of the crimes that occurred in the Belmont Cragin community?
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;
-- Database schema | Community_Area : community_area_no [ INTEGER ] primary_key , community_area_name [ TEXT ] , side [ TEXT ] , population [ TEXT ] | District : district_no [ INTEGER ] primary_key , district_name [ TEXT ] , address [ TEXT ] , zip_code [ INTEGER ] , commander [ TEXT ] , email [ TEXT ] , phone [ TEXT ] , fax [ TEXT ] , tty [ TEXT ] , twitter [ TEXT ] | FBI_Code : fbi_code_no [ TEXT ] primary_key , title [ TEXT ] , description [ TEXT ] , crime_against [ TEXT ] | IUCR : iucr_no [ TEXT ] primary_key , primary_description [ TEXT ] , secondary_description [ TEXT ] , index_code [ TEXT ] | Neighborhood : neighborhood_name [ TEXT ] primary_key , community_area_no [ INTEGER ] Neighborhood.community_area_no = Community_Area.community_area_no | Ward : ward_no [ INTEGER ] primary_key , alderman_first_name [ TEXT ] , alderman_last_name [ TEXT ] , alderman_name_suffix [ TEXT ] , ward_office_address [ TEXT ] , ward_office_zip [ TEXT ] , ward_email [ TEXT ] , ward_office_phone [ TEXT ] , ward_office_fax [ TEXT ] , city_hall_office_room [ INTEGER ] , city_hall_office_phone [ TEXT ] , city_hall_office_fax [ TEXT ] , Population [ INTEGER ] | Crime : report_no [ INTEGER ] primary_key , case_number [ TEXT ] , date [ TEXT ] , block [ TEXT ] , iucr_no [ TEXT ] Crime.iucr_no = IUCR.iucr_no , location_description [ TEXT ] , arrest [ TEXT ] , domestic [ TEXT ] , beat [ INTEGER ] , district_no [ INTEGER ] Crime.district_no = District.district_no , ward_no [ INTEGER ] Crime.ward_no = Ward.ward_no , community_area_no [ INTEGER ] Crime.community_area_no = Community_Area.community_area_no , fbi_code_no [ TEXT ] Crime.fbi_code_no = FBI_Code.fbi_code_no , latitude [ TEXT ] , longitude [ TEXT ] | -- -- How many different types of crimes, according to the primary description, have occurred in the Hermosa neighborhood?
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;