Recap - Police Criminal Arrest
Part of the Fundamentals section of Coddy's SQL journey — lesson 28 of 72.
Challenge
EasyAvailable tables and columns:
<strong>police_report</strong>:<strong>name</strong>,<strong>report</strong>,<strong>map</strong>,<strong>severe_score</strong>
Fetch the top 5 severe criminal names and order by severe_score in descending order
A severe criminal is someone who matches all of the following criteria:
reportis either null, or thereportcontains one of the following letters:g,b,G, orB.mapis one of the following places:Caerleon,Dewsbury,Kirkwall,Findochty.
Name the column as worst_criminals.
Try it yourself
All lessons in Fundamentals
4More Keywords
The IN keywordThe BETWEEN keywordThe LIKE keywordThe AS keywordRecap - Cellphone Models2Conditions
Conditions BasicsThe AND keywordThe OR keywordThe NOT keywordMultiple Conditions CombinedParenthesisBooleans5Arithmetic Operations
Mathematical OperatorsMathematical ColumnsThe Modulo OperationThe ROUND() Function3Specific Return Format
Null valuesSort Results Part 1Sort Results Part 2Recap - Cyber Security FirmLimit number of recordsRecap - Vehicle Factory6Intro Challenges
Recap - Parliamentary ElectionRecap - Police Criminal ArrestRecap - Bar Beverage ContainerRecap - Engineer new columns