RippleHire Interview Question

Write SQL queries for the following output