The following question will be based on City Jail database which is given 1.List all crime...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The following question will be based on City Jail database which is given 1.List all crime charges with a balance owed. List the charge ID, crime ID, fine amount, court fee, amount paid, and amount owed. Hint: Use this for formula (fine_amount+court_fee)-amount_paid "Owed" to find owed amount. Use Crime_charges table 2.List all criminals along with the crime charges filed. The report needs to include the criminal ID, name, crime code, and fine amount. Hint: Use Inner Join between criminals, crimes, crime_charges 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 ID and date charged. Hint: Use Inner Join among criminals, crimes, crime_charges 4. 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. Sample Output Second Letter of Precinct Code A 11 Description Shady Grove Center City Bay Land Q Hint: Use DECODE or CASE to find second column (Description) result. Description column name is a Alias and it will be custom made based on DECODE or CASE result Use this formular CASE (SUBSTR(precinct, 2,1), 'A' Or DECODE(SUBSTR(precinct, 2, 1), 'A', The following question will be based on City Jail database which is given 1.List all crime charges with a balance owed. List the charge ID, crime ID, fine amount, court fee, amount paid, and amount owed. Hint: Use this for formula (fine_amount+court_fee)-amount_paid "Owed" to find owed amount. Use Crime_charges table 2.List all criminals along with the crime charges filed. The report needs to include the criminal ID, name, crime code, and fine amount. Hint: Use Inner Join between criminals, crimes, crime_charges 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 ID and date charged. Hint: Use Inner Join among criminals, crimes, crime_charges 4. 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. Sample Output Second Letter of Precinct Code A 11 Description Shady Grove Center City Bay Land Q Hint: Use DECODE or CASE to find second column (Description) result. Description column name is a Alias and it will be custom made based on DECODE or CASE result Use this formular CASE (SUBSTR(precinct, 2,1), 'A' Or DECODE(SUBSTR(precinct, 2, 1), 'A',
Expert Answer:
Answer rating: 100% (QA)
1 SELECT chargeID crimeID fineamount courtfee amountpaid fineamount courtfee amountpaid AS amountowe... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
discuss the role of advanced indexing structures, such as multidimensional indexes, spatial indexes, and full-text indexes, in supporting complex query operations and data retrieval patterns in...
-
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. 1. List the following...
-
The new standard, Revenue from Contracts with Customers, a. adopts an asset-liability approach for revenue recognition. O b. adopts criteria that deemphasize the importance of contracts with...
-
Dennis Harding is considering acquiring a new automobile that he will use 100% for business. The purchase price of the automobile would be $48,500. If Dennis leased the car for five years, the lease...
-
The bowling ball shown rolls without slipping on the horizontal xz plane with an angular velocity = xi + yj + zk. Knowing that vB = (10.8 ft/s)i ?? (14.4 ft/s)j + (14.4 ft/s)k and vD (21.6 ft/s)i +...
-
Fred, Inc., and Herman Corporation formed a business combination on January 1, 2019, when Fred acquired a 60 percent interest in Hermans common stock for $312,000 in cash. The book value of Hermans...
-
Mr. Jones was considering a new grapefruit venture that would generate a random sequence of yearly cash flows. He asked his son. Gavin, "People tell me I should use a cost of capital figure to...
-
Do you believe that the Department of Transportations current rules for helping DBEs get highway construction contracts pass the strict scrutiny requirement?
-
1. Fire Safety Management is an integral part of the organization's overall state of emergency preparedness and management. As the appointed fire salety manager. Discuss the fire safety management...
-
Managers at Wagner Fabricating Company are reviewing the economic feasibility of manufacturing a part that the company currently purchases from a supplier. Forecasted annual demand for the part is...
-
Schiller Company has unit costs of $3 for materials and $9 for conversion costs. There are 5,600 units in ending work in process which are 25% complete as to conversion costs, and fully complete as...
-
On December 15, a small company starts transitioning to a new accounting package during their holiday break. Suddenly, on January 2, when employees return to work at 9:00 a.m., all computers in the...
-
What amount of michaels capital stock transactions are added to gross income on his 1040?
-
Summarize The Tax Cuts and Jobs Act (TCJA) significantly raised the standard deduction for all taxpayers. For single filers, it increased from $6,350 to $12,000, for heads of households from $9,350...
-
. Carolyn and Jim are planning on retiring next year when they turn 65. (i) They estimate that they will need $62235 per year when they retire to cover their expenses, travel and taxes. (ii) They...
-
Consider why Wallerstein thinks it's important to analyze globalization in historical stages. What happens in the periphery and semi-periphery of a world system for core countries to develop? To help...
-
Determine whether each of these proposed definitions is a valid recursive definition of a function f from the set of nonnegative integers to the set of integers. If f is well defined, find a formula...
-
The cost curve for the city water supply is C(Q) = 16 + 1/4 Q2, where Q is the amount of water supplied and C(Q) is the cost of providing Q acre-feet of water. (An acre-foot is the amount of water...
-
Which of the following is correct? a. A group function can be nested inside a group function. b. A group function can be nested inside a single-row function. c. A single-row function can be nested...
-
Why are the NATURAL JOIN keywords not an option for producing a self-join?
-
What is the purpose of the SELECT statement?
-
The circuit diagram for a rectifier is sometimes drawn with a resistor in the center. Would the rectifier function if this resistor were replaced by a capacitor?
-
The rectifier shown in Figure P32.28 converts the alternating emf from an \(\mathrm{AC}\) source to a positive-only potential difference from a to \(\mathrm{b}\). Sketch graphs showing \((a)\) the...
-
The logic gate in Figure P32.30 contains four field-effect transistors. Each of the gates A-D of the transistors may be positively biased ( \(\mathrm{Y}\) in the table) or not ( \(\mathrm{N}\) in the...
Study smarter with the SolutionInn App