Chinastark/bird_dataset huggingface dataset:
Database: chicago_crime
Question: What is the percentage of larceny cases among all cases that happened in Edgewater community?
Evidence: larceny case refers to title = 'Larceny'; Edgewater community refers to community_area_name = 'Edgewater'; percentage = divide(count(case_number where title = 'Larceny'), count(case_number)) where community_area_name = 'Edgewater' * 100%
SQL: 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: chicago_crime
Question: How many crimes were committed at 018XX S KOMENSKY AVEin May 2018?
Evidence:  in May 2018 refers to date LIKE '5/%/2018%'
SQL: SELECT SUM(CASE WHEN date LIKE '5/%/2018%' THEN 1 ELSE 0 END) FROM Crime WHERE block = '018XX S KOMENSKY AVE'
Database: chicago_crime
Question: What is the name of the community with the highest population?
Evidence: name of the community refers to community_area_name; the highest population refers to max(population)
SQL: SELECT community_area_name FROM Community_Area ORDER BY population DESC LIMIT 1
Database: chicago_crime
Question: How many incidents of domestic violence occurred in an abandoned building in 2018?
Evidence: domestic violence refers to domestic = 'TRUE'; in an abandoned building refers to location_description = 'ABANDONED BUILDING'; in 2018 refers to date LIKE '%2018%'
SQL: SELECT SUM(CASE WHEN location_description = 'ABANDONED BUILDING' THEN 1 ELSE 0 END) FROM Crime WHERE date LIKE '%2018%' AND domestic = 'TRUE'
Database: chicago_crime
Question: What is the population of the district with the least population?
Evidence: the least population refers = min(sum(population))
SQL: SELECT SUM(population) FROM Community_Area GROUP BY side ORDER BY SUM(population) LIMIT 1
Database: chicago_crime
Question: How many arrests were made in 2018 in an animal hospital under FBI code 08B?
Evidence: arrest refers to arrest = 'TRUE'; in 2018 refers to date LIKE '%2018%'; in an animal hospital refers to location_description = 'ANIMAL HOSPITAL'; FBI code 08B refers to fbi_code_no = '08B'
SQL: 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: chicago_crime
Question: Give the detailed description of all the crimes against society.
Evidence: crime against society refers to crime_against = 'Society'
SQL: SELECT description FROM FBI_Code WHERE crime_against = 'Society'
Database: chicago_crime
Question: Who is the commanding officer in the district with the highest number of disorderly conduct?
Evidence: commanding officer refers to commander; the highest number refers to max(count(district_no)); disorderly conduct refers to title = 'Disorderly Conduct'
SQL: 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: chicago_crime
Question: Which crime was committed the most by criminals?
Evidence: crime refers to title; committed the most refers to max(fbi_code_no)
SQL: 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: chicago_crime
Question: In Albany Park, how many arrests were made in an apartment due to criminal sexual abuse?
Evidence: Albany Park refers to district_name = 'Albany Park'; in an apartment refers to location_description = 'APARTMENT'; criminal sexual abuse refers to title = 'Criminal Sexual Abuse'
SQL: 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: chicago_crime
Question: What is the precise location or coordinate where most of the robberies in Rogers Park occurred?
Evidence: precise location or coordinate refers to latitude, longitude; most refers to fbi_code_no = 3; robbery refers to title = 'Robbery'; Rogers Park refers to community_area_name = 'Rogers Park'
SQL: 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: chicago_crime
Question: How many solicit on public way prostitution crimes were arrested in West Garfield Park?
Evidence: solicit on public way prostitution crime refers to secondary_description = 'SOLICIT ON PUBLIC WAY' AND primary_description = 'PROSTITUTION'; arrested refers to arrest = 'TRUE'; West Garfield Park refers to community_area_name = 'West Garfield Park'
SQL: 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: chicago_crime
Question: In the most populated ward, how many incidents of domestic violence were reported in a bar or tavern?
Evidence: the most populated refers to max(population); domestic violence refers to domestic = 'TRUE'; in a bar or tavern refers to location_description = 'BAR OR TAVERN'
SQL: 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: chicago_crime
Question: How many neighborhoods are there in Near North Side?
Evidence: Near North Side refers to community_area_name = 'Near North Side'
SQL: 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: chicago_crime
Question: Out of all the incidents of domestic violence reported at the ward represented by alderman Walter Burnett Jr., how many were arrested?
Evidence: domestic violence refers to domestic = 'TRUE'; arrested refers to arrest = 'TRUE'
SQL: 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: chicago_crime
Question: What is the short description of the crime committed the most by criminals in the least populated community?
Evidence: short description refers to title; committed the most refers to max(fbi_code_no); the least populated community refers to min(population)
SQL: 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: chicago_crime
Question: What is the legislative district's office address where 010XX W LAKE ST is located?
Evidence: the legislative district's office address refers to ward_office_address; 010XX W LAKE ST refers to block = '010XX W LAKE ST'
SQL: 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: chicago_crime
Question: What is the name of the community that has the highest number of crimes related to prostitution?
Evidence: name of the community refers to community_area_name; the highest number of crimes refers to max(case_number); prostitution refers to primary_description = 'PROSTITUTION'
SQL: 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: chicago_crime
Question: How many vandalisms were arrested in the ward represented by Edward Burke?
Evidence: vandalism refers to title = 'Vandalism'; arrested refers to arrest = 'TRUE'
SQL: 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: chicago_crime
Question: How many domestic violence cases were reported in May 2018?
Evidence: domestic violence refers to domestic = 'TRUE'; in May 2018 refers to date LIKE '5/%/2018%'
SQL: SELECT COUNT(*) FROM Crime WHERE date LIKE '5/%/2018%' AND domestic = 'TRUE'
Database: chicago_crime
Question: List the IUCR numbers and index status of homicide incidents.
Evidence: index status refers to index_code; homicide incident refers to primary_description = 'HOMICIDE'
SQL: SELECT index_code FROM IUCR WHERE primary_description = 'HOMICIDE'
Database: chicago_crime
Question: Provide the responsible person and his/her email address of Chicago Lawn.
Evidence: responsible person refers to commander; email address refers to email; Chicago Lawn refers to district_name = 'Chicago Lawn'
SQL: SELECT commander, email FROM District WHERE district_name = 'Chicago Lawn'
Database: chicago_crime
Question: What is the alderman's full name of the most crowded ward?
Evidence: alderman's full name refers to alderman_name_suffix, alderman_first_name, alderman_last_name; the most crowded refers to max(population)
SQL: SELECT alderman_name_suffix, alderman_first_name, alderman_last_name FROM Ward ORDER BY population DESC LIMIT 1
Database: chicago_crime
Question: List the community area names in the Northwest.
Evidence: the Northwest refers to side = 'Northwest'
SQL: SELECT community_area_name FROM Community_Area WHERE side = 'Northwest'
Database: chicago_crime
Question: List down the titles and descriptions of the crimes cases against persons.
Evidence: crime case against persons refers to crime_against = 'Persons'
SQL: SELECT title, description FROM FBI_Code WHERE crime_against = 'Persons'
Database: chicago_crime
Question: Describe the specific description and case locations under IUCR 142.
Evidence: specific description refers to secondary_description; location refers to latitude, longitude; IUCR 142 refers to iucr_no = 142
SQL: 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: chicago_crime
Question: How many crimes were handled by Brendan Reilly on 7th October 2018?
Evidence: 7th October 2018 refers to date like '10/7/2018%'
SQL: 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: chicago_crime
Question: How many cases have been arrested among the crimes that happened in the restaurant of Englewood?
Evidence: arrested refers to arrest = 'TRUE'; restaurant refers to location_description = 'RESTAURANT'; Englewood refers to district_name = 'Englewood'
SQL: 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: chicago_crime
Question: Provide case numbers, aldermen's full names, and district names of the crimes that happened in 0000X N FRANCISCO AVE.
Evidence: aldermen's full name refers to alderman_name_suffix, alderman_first_name, alderman_last_name; 0000X N FRANCISCO AVE refers to block = '0000X N FRANCISCO AVE'
SQL: 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: chicago_crime
Question: How many crimes were Misc Non-Index Offense?
Evidence: Misc Non-Index Offense refers to title = 'Misc Non-Index Offense'
SQL: 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: chicago_crime
Question: List down the neighborhood areas of Douglas.
Evidence: neighborhood area refers to neighborhood_name; Douglas refers to community_area_name = 'Douglas'
SQL: 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: chicago_crime
Question: Calculate the average crime rate per month in the highest populous area.
Evidence: the highest populous refers to max(population); average crime rate per month = divide(count(report_no where population = max(population)), 12)
SQL: 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: chicago_crime
Question: Among the crimes in the Central, calculate the percentage of larceny incidents.
Evidence: Central refers to side = 'Central'; larceny refers to title = 'Larceny'; percentage = divide(count(report_no where title = 'Larceny'), count(report_no)) where side = 'Central' * 100%
SQL: 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: chicago_crime
Question: List the location descriptions and aldermen's full names of the arson by explosive.
Evidence: aldermen's full name refers to alderman_name_suffix, alderman_first_name, alderman_last_name; arson by explosive refers to primary_description = 'ARSON' AND secondary_description = 'BY EXPLOSIVE'
SQL: 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: chicago_crime
Question: Provide the occurrence date and location of the deceptive practice due to the unlawful use of recorded sound.
Evidence: location refers to latitude, longitude; deceptive practice refers to primary_description = 'DECEPTIVE PRACTICE'; unlawful use of recorded sound refers to secondary_description = 'UNLAWFUL USE OF RECORDED SOUND'
SQL: 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: chicago_crime
Question: Among the criminal sexual assaults in the district of Adnardo Gutierrez, how many cases happened in the residence?
Evidence: criminal sexual assault refers to title = 'Criminal Sexual Assault'; Adnardo Gutierrez refers to commander = 'Adnardo Gutierrez'; in the residence refers to location_description = 'RESIDENCE'
SQL: 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: chicago_crime
Question: How many percent of domestic violence cases were arrested in West Pullman?
Evidence: domestic violence refers to domestic = 'TRUE'; arrested refers to arrest = 'TRUE'; West Pullman refers to community_area_name = 'West Pullman'; percent = divide(count(report_no where arrest = 'TRUE'), count(report_no)) where domestic = 'TRUE' and community_area_name = 'West Pullman' * 100%
SQL: 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: chicago_crime
Question: Calculate the percentage of the domestic violence cases handled by Christopher Taliaferro. Among them, list report numbers of cases that happened in the bank.
Evidence: domestic violence refers to domestic = 'TRUE'; report number refers to report_no; in the bank refers to location_description = 'BANK'; percentage = divide(count(report_no where domestic = 'TRUE'), count(report_no)) * 100%
SQL: 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: chicago_crime
Question: How many aldermen have "James" as their first name?
SQL: SELECT COUNT(*) FROM Ward WHERE alderman_first_name = 'James'
Database: chicago_crime
Question: How many crimes are commited on January 1, 2018?
Evidence: on January 1 2018 refers to date LIKE '1/1/2018%'
SQL: SELECT COUNT(*) FROM Crime WHERE date LIKE '1/1/2018%'
Database: chicago_crime
Question: Calculate the average population of community areas in the West side.
Evidence: the West side refers to side = 'West'; average population = avg(population) where side = 'West'
SQL: SELECT AVG(population) FROM Community_Area WHERE side = 'West '
Database: chicago_crime
Question: Among the cases reported in the ward with Edward Burke as the alderman and happened in the community area with the highest population, provide the report number of the crime with the highest beat.
Evidence: the highest population refers to max(population); report number refers to report_no; the highest beat refers to max(beat)
SQL: 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: chicago_crime
Question: How many of the crimes that happened in the street have FBI title "Homicide 1st & 2nd Degree"?
Evidence: in the street refers to location_description = 'STREET'
SQL: 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: chicago_crime
Question: Who is the alderman in the ward associated with the crime with report number 23769?
Evidence: alderman refers to alderman_suffix, alderman_first_name, alderman_last_name; report number 23769 refers to report_no = 23769
SQL: 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: chicago_crime
Question: List the case numbers of domestic violence crimes reported in Lincoln Square.
Evidence: domestic violence refers to domestic = 'TRUE'; Lincoln Square refers to community_area_name = 'Lincoln Square'
SQL: 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: chicago_crime
Question: Among the crimes reported to the ward located at 1958 N. Milwaukee Ave., list down the report number of the crimes happened inside the apartment.
Evidence: 1958 N. Milwaukee Ave. refers to ward_office_address = '1958 N. Milwaukee Ave.'; report number refers to case_number; inside the apartment refers to location_description = 'APARTMENT'
SQL: 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: chicago_crime
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
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
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
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
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
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
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'