This is a database-focused problem where you are given two tables: Countries and Weather. You need to find the "Weather Type" for each country for a specific month (usually November 2019). The weather type is determined by the average weather state: if the average is ≤ 15, it's "Cold"; if it's ≥ 25, it's "Hot"; otherwise, it's "Warm".
SQL and Database questions are common for data-centric roles or full-stack positions. This specific problem tests your ability to perform Joins, filter data by date ranges using functions like BETWEEN or LEFT(), and use conditional logic like CASE statements or IF() within an aggregation function like AVG(). It evaluates how you handle relational data mapping.
The pattern here is Relational Algebra and Aggregation. You must:
Countries and Weather tables on the country ID.AVG().CASE statement.Country: "Iceland" (ID: 1). Weather records for Nov: [5, 10, 15].
[30, 28, 32].Master the CASE WHEN statement in SQL. It is the equivalent of an if-else block in programming and is essential for categorizing data based on calculated metrics in reports.