Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in sql Case Study: City Jail Note: Use the City Jail database created with the City Jail_8.sql script that you ran for the Chapter 8

image text in transcribed
image text in transcribed
image text in transcribed
in sql
Case Study: City Jail Note: Use the City Jail database created with the City Jail_8.sql script that you ran for the Chapter 8 case study. The following list reflects the current data requests from city managers. Provide the SQL statements that satisfy the requests. For each request, include one solution using the traditional method and one using an ANSI JOIN statement. Test the statements and show execution results. 1. List all criminals along with the crime charges filed. The report needs to include the criminal ID, name, crime code, and fine amount 2. List all criminals along with crime status and appeal status (if applicable). The reports need to include the criminal ID. name, crime classification date charged, appeal filing date and appeal status Show all criminals regardless of whether they have filed an appeal 3. List all criminals along with crime information. The report needs to include the criminal ID name, crime classification 3 List all criminals along with crime information. The report needs to include the criminal ID, name, crime classification date charged, crime code, and fine amount. Include only crimes classified as Other. Sort the list by criminal D and date charged 4. Create an alphabetical list of all criminals, including criminal ID name, violent offender status, parole status, and any known aliases 5. A table named Prob_Contact contains the required frequency of contact with a probation officer, based on the length of the probation period (the number of days assigned to probation). Review the data in this table, which indicates ranges for the number of days and applicable contact frequencies. Create a list containing the name of each criminal who has been assigned a probation period, which is indicated by the sentence type. The list mould contain the criminal name. probation start date, probation end date, and required frequency of contact, Sort the list by criminal name and probation start date. 6. A column named Mgr ID has been added to the Prob_Officers table and contains the ID number of the probation supervisor for each officer, Produce a list showing each probation officer's name and his or her supervisor's name. Sort the list ainhabetically by probation officer nama date charged 4. Create an alphabetical list of all criminals, including culminal ID, name, violent offender status, parole status, and any known aliases 5. A table named Prob_Contact contains the required frequency of contact with a probation officer, based on the length of the probation period (the number of days assigned to probation). Review the data in this table, which indicates ranges for the number of days and applicable contact frequencies. Create a list containing the name of each criminal who has been assigned a probation period, which is indicated by the sentence type. The list should contain the criminal name, probation start date, probation end date, and required frequency of contact. Sort tile list by criminal name and probation start/date. 6. A column named Mgr_ID has been added to the Prob_Officers table and contains the ID number of the probation supervisor for each officer Produce a list showing each probation officer's name and his or her supervisor's name Sort the list alphabetically by probation officer name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions