'How I solve this questions?

I tried everything but I can't solve it, someone can help me cause I would like to understand it for getting more experience.

sql


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source