Epsilon Interview Question

SQL, DBMS, logic building, one coding question.