The Software Practice Interview Question

1 SQL problem, 6 CP-type problem