Tech Mahindra interview question

SQL queries, to get the data based on certain conditions