Kickdrum Interview Question

The first question was a general coding question second was based on database queries and joins