Company: Accenture NIT Patna
Difficulty: medium
Problem Description Write a SQL query to identify high-earning chefs working at 4-star hotels. Specifically, retrieve the StaffID and HotelID for staff members who meet all of the following criteria: Their Position is exactly 'Chef' . Their Salary is strictly greater than 35000 . They work at a hotel with a 4-star rating ( Rating = 4 ). Schema Table: Staff StaffID (INT): The unique identifier for the staff member (Primary Key). HotelID (INT): The identifier for the hotel where the staff member works (Foreign Key to the Hotel table). Position (VARCHAR): The job title of the staff member (e.g., 'Chef', 'Manager'). Salary (DECIMAL): The annual salary of the staff member. Table: Hotel HotelID (INT): The unique identifier for the hotel (Primary Key). Rating (INT): The star rating of the hotel (e.g., 1, 2, 3, 4, 5). Required Output Your query should return a result set with exactly two columns in the following order: StaffID | HotelID Constraints or Notes There are no specific sorting requir