ZS Associates Interview Question

Guess estimates and puzzles and sql queries