Question
Place your query below each question The following list reflects current data requests from city managers. Provide the SQL statement to satisfy each request. Test
Place your query below each question
The following list reflects current data requests from city managers. Provide the SQL statement to satisfy each request. Test the statements and show execution results.
List the following information for all crimes that have a period greater than 14 days between the date charged and the hearing date: crime ID, classification, date charged, hearing date, and number of days between the date charged and the hearing date.
Produce a list showing each active police officer and his or her community assignment, indicated by the second letter of the precinct code. Display the community description listed in the following chart, based on the second letter of the precinct code.
Second Letter of Precinct Code | Description |
A | Shady Grove |
B | Center City |
C | Bay Landing |
Produce a list of sentencing information to include criminal ID, name (displayed in all uppercase letters), sentence ID, sentence start date, and length in months of the sentence. The number of months should be shown as a whole number. The start date should be displayed in the format December 17, 2009.
A list of all amounts owed is needed. Create a list showing each criminal name, charge ID, total amount owed (fine amount plus court fee), amount paid, amount owed, and payment due date. If nothing has been paid to date, the amount paid is NULL. Include only criminals who owe some amount of money. Display the dollar amounts with a dollar sign and two decimals.
Display the criminal name and probation start date for all criminals who have a probation period greater than two months. Also, display the date thats two months from the beginning of the probation period, which will serve as a review date.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started