MVP Asia Pacific interview question

1. Write a simple selenium script with this kind of situation. 2. Write an SQL Query with this situation.