ITR Laboratories interview question

Question: write one query for sql and linq