DISH interview question

Write the SQL queries for questions