Question: Page Page numberof 3 Introduction to Database and SQL ( ITC 5 1 0 4 ) Assignment 0 4 City Jail Assignment 0 4 Submission:
Page Page numberof Introduction to Database and SQL ITC Assignment City Jail Assignment Submission: Rename this document by replacing StdNumber by your student number and Name by your name. This is your work, do it yourself. SQL Format Keywords must be in lower case Table names must be in upper case Column names must be in upper case Functions are in lower case Column alias are mixed case MAKE THE CODE READABLE!!! Note: Run the CityJailsql file provided by your instructor to ensure that all necessary tables and constraints are available for this case study. This script isnt included in student data files because case study assignments in previous chapters include table creation challenges. This script rebuilds the City Jail database. Dont be concerned with errors from the DROP TABLE commands, which delete any existing tables of the same names. The following list reflects common data requests from city managers. Write the SQL statements to satisfy the requests. If the query can be accomplished by using different operators, supply alternative solutions so that the performancetuning group can test them and identify the more efficient statements. Test the statements and show execution results. List all criminal aliases beginning with the letter B SQL: Screen shot: List all crimes that occurred were charged during the month October List the crime ID criminal ID date charged, and classification. SQL: Screen shot: Assignment of Introduction to Database and SQL ITC Assignment City Jail List all crimes with a status of CA can appeal or IA in appeal List the crime ID criminal ID date charged, and status. SQL: Screen shot: List all crimes classified as a felony. List the crime ID criminal ID date charged, and classification. SQL: Screen shot: List all crimes with a hearing date more than days after the date charged. List the crime ID criminal ID date charged, and hearing date. SQL: Screen shot: List all criminals with the zip code List the criminal ID last name, and zip code. Sort the list by criminal ID SQL: Screen shot: List all crimes that dont have a hearing date scheduled. List the crime ID criminal ID date charged, and hearing date. List all sentences with a probation officer assigned. List the sentence ID criminal ID and probation officer ID Sort the list by probation officer ID and then criminal ID SQL: Screen shot: Assignment of Introduction to Database and SQL ITC Assignment City Jail Assignment of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
