Question: The citys Crimes Analysis unit has submitted the following data requests. Provide the SQL statements to satisfy these requests. Test the statements and show the
The city’s Crimes Analysis unit has submitted the following data requests. Provide the SQL statements to satisfy these requests. Test the statements and show the query results.
1. Show the average number of crimes reported by an officer.
2.Show the total number of crimes by status.
3. List the highest number of crimes committed by a person.
4. Display the lowest fine amount assigned to a crime charge.
5. List criminals (ID and name) who have multiple sentences assigned.
6. List the total number of crime charges successfully defended (guilty status assigned) by precinct. Include only precincts with at least seven guilty charges.
7. List the total amount of collections (fines and fees) and the total amount owed by crime classification.
8. Use single queries to address the following requests:
9. List the total number of charges by crime classification and charge status. Include a grand total in the results.
10. Perform the same task as in Question #8 and add the following:
a) A subtotal by each crime classification and
b) A subtotal for each charge status. Provide two different queries to accomplish this task.
Step by Step Solution
3.32 Rating (164 Votes )
There are 3 Steps involved in it
1 SELECT AVGCOUNT FROM crimeofficers GROUP BY officerid 2 SELECT status COUNT FROM crimes GROUP BY s... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
1803_60b8c1212946a_716630.pdf
180 KBs PDF File
1803_60b8c1212946a_716630.docx
120 KBs Word File
