HP Inc. Interview Question

SQL join related questions and basic logic questions