David L. answered 05/10/23
SQL expert, fantastic teacher, complete courses or help with 1 query
If the data is in one table (I'll call it officers) with two columns, officer_name and number_crimes, this query will do it:
The average number of crimes officers have reported is given by the subquery. The database will first evaluate the subquery, then replace the subquery with that average number, and the outer query will find the names of the officers who have reported more than the average number of crimes.