Dimentrix Interview Question

SQL and Database related , puzzles