1sf/bird-sql-train-with-schema huggingface dataset:
Database: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: What is the total number of crimes that happened in Bridgeport with beat less than 1000?
Evidence: Bridgeport refers to community_area_name = 'Bridgeport'; with beat less than 1000 refers to beat < 1000; total number = count(beat) where community_area_name = 'Bridgeport' and beat < 1000
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: List the report number of crimes reported in a community area in the far north side with a population greater than 60,000.
Evidence: report number refers to report_no; the far north side refers to side = 'Far North'; population greater than 60,000 refers to population > '60000'
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: List the report number of crimes against property happened in Riverdale.
Evidence: crime against property refers to crime_against = 'Property'; Riverdale refers to community_area_name = 'Riverdale'
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: How many domestic violence cases were brought in the ward that uses "ward13@cityofchicago.org"?
Evidence: domestic violence refers to domestic = 'TRUE'; uses "ward13@cityofchicago.org" refers to ward_email = 'ward13@cityofchicago.org'
SQL: SELECT SUM(CASE WHEN T2.domestic = 'TRUE' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no WHERE T1.ward_email = 'ward13@cityofchicago.org'
Database: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: What is the district address associated with the case JB107731?
Evidence: case JB107731 refers to case_number = 'JB107731'
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: Calculate the total beat of the crimes reported in a community area in the central side with population of 50,000 and above.
Evidence: the central side refers to side = 'Central'; population of 50,000 and above refers to population > '50000'; total beat = sum(beat) where side = 'Central' and population > '50000'
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: List the case number of crimes against society that happened in June 2018.
Evidence: crime against society refers to crime_against = 'Society'; in June 2018 refers to date LIKE '6/%/2018%'
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: Among the crimes located in the community area with the highest population, what is the percentage of domestic violence?
Evidence: the highest population refers to max(population); domestic violence refers to domestic = 'TRUE'; percentage = divide(count(domestic = 'TRUE'), count(domestic)) where population = max(population) * 100%
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: List the case number of the crimes in wards with population below 52000 that have beat greater than the 90% of the average beat of all crimes.
Evidence: population below 52000 refers to population < 52000; beat greater than the 90% of the average beat refers to beat > multiply(avg(beat), 0.9) where population < 52000
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: Please list the area name of the communities in the Far north side, which has a population of more than 50000 but less than 70000.
Evidence: area name refers to community_area_name; the Far north side refers to side = 'Far North'; a population of more than 50000 but less than 70000 refers to population BETWEEN '50000' AND '70000'
SQL: SELECT community_area_name, side FROM Community_Area WHERE side = 'Far North ' AND population BETWEEN 50000 AND 70000
Database: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: Give the coordinate of the alleys where a crime was reported and an arrest was made.
Evidence: coordinate refers to latitude, longitude; alley refers to location_description = 'ALLEY'; an arrest was made refers to arrest = 'TRUE'
SQL: SELECT latitude, longitude FROM Crime WHERE location_description = 'ALLEY' AND arrest = 'TRUE' GROUP BY latitude, longitude
Database: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: Find the commander's name, email address, and phone number of the Ogden district.
Evidence: commander's name refers to commander; email address refers to email; phone number refers to phone
SQL: SELECT commander, email, phone FROM District WHERE district_name = 'Ogden'
Database: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: What is the FBI code and definition of Gambling?
Evidence: FBI code refers to fbi_code_no; definition refers to description; Gambling refers to title = 'Gambling'
SQL: SELECT fbi_code_no, description FROM FBI_Code WHERE title = 'Gambling'
Database: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: Among the crimes, what percentage are severe?
Evidence: severe refers to index_code = 'I'; percentage = divide(count(iucr_no where index_code = 'I'), count(iucr_no)) * 100%
SQL: SELECT CAST(COUNT(CASE WHEN index_code = 'I' THEN iucr_no ELSE NULL END) AS REAL) * 100 / COUNT(iucr_no) FROM IUCR
Database: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: What kind of location in Austin reported the most number of crimes?
Evidence: "Austin" is the district_name; the most number of crime refers to Max(Count(case_number)); kind of location refers to location_description
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: On average, how many community areas are there in a side?
Evidence: average = Divide(Count(ward_no), Count(side))
SQL: 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: chicago_crime
Tables: Community_Area, District, FBI_Code, IUCR, Neighborhood, Ward, Crime
Columns (table index, column name): -1, *, 0, community_area_no, 0, community_area_name, 0, side, 0, population, 1, district_no, 1, district_name, 1, address, 1, zip_code, 1, commander, 1, email, 1, phone, 1, fax, 1, tty, 1, twitter, 2, fbi_code_no, 2, title, 2, description, 2, crime_against, 3, iucr_no, 3, primary_description, 3, secondary_description, 3, index_code, 4, neighborhood_name, 4, community_area_no, 5, ward_no, 5, alderman_first_name, 5, alderman_last_name, 5, alderman_name_suffix, 5, ward_office_address, 5, ward_office_zip, 5, ward_email, 5, ward_office_phone, 5, ward_office_fax, 5, city_hall_office_room, 5, city_hall_office_phone, 5, city_hall_office_fax, 5, Population, 6, report_no, 6, case_number, 6, date, 6, block, 6, iucr_no, 6, location_description, 6, arrest, 6, domestic, 6, beat, 6, district_no, 6, ward_no, 6, community_area_no, 6, fbi_code_no, 6, latitude, 6, longitude
Question: Which community area has the highest number of crimes reported on the street?
Evidence: reported on the street refers to location_description = 'STREET'; community area with highest number of crime refers to Max(Count(location_description)); community area refers to community_area_no
SQL: 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