Recap - Cyber Security Firm
Part of the Fundamentals section of Coddy's SQL journey — lesson 15 of 72.
Challenge
EasyAvailable tables and columns:
<strong>events</strong>:<strong>id</strong>,<strong>name</strong>,<strong>size</strong>,<strong>year</strong>
You have a cyber security firm that experienced an arbitrary attack, resulting in all of your systems shutting down. To solve this issue, you need to identify all of the events that appear suspicious. A suspicious event meets one or more of the following criteria:
- Its size is significantly different from the average normal event size of 50MB. For this analysis, consider files smaller than 1MB or larger than 100MB as suspicious.
- It was created before the year 2000
- It has a missing name
Your task:
- Identify all suspicious events based on the criteria mentioned above.
- Return the event IDs and their names in descending order by their ID.
Note: An event can be suspicious for multiple reasons. For example, an event with size 72MB and year 1051 would be flagged because of its year (1051 < 2000), not its size (72MB is within normal range).
Try it yourself
SELECT id, name
FROM events
-- Write your code below
WHEREAll 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