WebCodeGenie Interview Question

1. Logical question 2. SQL Query