Anonymous interview question

Complete the given sql Query and how you approached it ?