Impetus Technologies interview question

SQL queries on ground by and having