Analyze and implement SQL joins (INNER, LEFT, RIGHT, FULL) to manage scenarios involving NULL values and repeating records. Write queries that correctly handle these cases and interpret the resulting output to ensure accurate data retrieval.
Write an SQL query to identify the top product in each category based on a specified criterion (e.g., highest sales, rating, or revenue). The query should group products by category and return the product that meets the criterion within each group.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?