PTC interview question

Solve SQL Query, using Constraints