The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Jul 2017 |
| Last Sign in: | 304 Weeks Ago, 1 Day Ago |
| Questions Answered: | 15833 |
| Tutorials Posted: | 15827 |
MBA,PHD, Juris Doctor
Strayer,Devery,Harvard University
Mar-1995 - Mar-2002
Manager Planning
WalMart
Mar-2001 - Feb-2009
Â
Following questions are based on Crime-Tracking database that contains following tables:
Ø Criminals
o  Name, address, phone number, violent offender status (yes/no), probation status(yes/no), and aliases
Ø Crimes
o  Classification (felony, misdemeanor, other), date charged, appeal status(closed, can appeal, in appeal), hearing date, appeal cutoff date(always 60 days after the hearing date), arresting officers(can be more than one officer), crime codes(such as burglary, forgery, assault; hundreds of codes exists), amount of fine, court fee, amount paid, payment due date, and charge status(pending, guilty, not guilty)
Ø Sentencing:
o  Start date, end date, number of violations(such as not reporting to probation officer), and type of sentence (jail period, house arrest, probation)
Ø Appeals
o  Appeal filing date, appeal hearing date, status(pending, approved, and disapproved)
o  Note: Each crime case can be appealed up to three times
Ø Police Officers
o  Name, precinct, badge number, phone contact, status(active/inactive)
Notes:
·       A single crime can involve multiple crime charges, such as burglary and assault
·       Criminals can be assigned multiple sentences. For example, a criminal might be required to serve a jail sentence following by a period of probation
Â
Â
Answer:
Â
select co.officer_id, o.last, o.first
from crime_officers co join
    officers o
    on co.officer_id = o.officer_id
group by co.officer_id, o.last, o.first
having count(*) > (select count(*) / count(distinct officer_id)
                  from crime_officers
                 );
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Â
Attachments:
----------- Â ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly