Flag%20question%3A%20Question%204%0AQuestion%204%0A3%20pts%0AWhich%20of%20the%20queries%2…
- User
Flag%20question%3A%20Question%204%0AQuestion%204%0A3%20pts%0AWhich%20of%20the%20queries%20retrieves%20the%20names%20of%20employees%20who%20make%20at%20least%20%2410%2C000%20more%20than%20the%20employee%20who%20is%20paid%20the%20least%20in%20the%20company.%0AGroup%20of%20answer%20choices%0ASELECT%20MIN(SALARY)%20FROM%20EMPLOYEE%20WHERE%20(SELECT%20SALARY%20%3E%3D%2010000%20%2B)%0ASELECT%20LNAME%20FROM%20EMPLOYEE%20WHERE%20SALARY%20%3E%3D%20MIN(SALARY)%20FROM%20EMPLOYEE)%0ASELECT%20LNAME%20FROM%20EMPLOYEE%20WHERE%20SALARY%20%3E%3D%2010000%20%2B%20(%20SELECT%20MIN(SALARY)%20FROM%20EMPLOYEE)%0ASELECT%20LNAME%20FROM%20EMPLOYEE%20WHERE%20SALARY%20%3E%3D%2010000%20%2B%20AND%20MIN(SALARY)%20FROM%20EMPLOYEE
- Assistant
To retrieve the names of employees who earn at least $10,000 more than the employee who is paid the least in the company, you need an SQL query that combines the minimum salary calculation with a condition that filters employees based on their salary.
Here's the correct way to write the SQL query for that requirement:
SELECT LNAME FROM EMPLOYEE WHERE SALARY >= (SELECT MIN(SALARY) FROM EMPLOYEE) + 10000;This SQL query performs the following:
- It selects the last names (LNAME) from the EMPLOYEE table.
- The condition for the selection is that the SALARY must be greater than or equal to the minimum salary from the EMPLOYEE table plus $10,000.
Reviewing the answer choices provided in your question:
-
SELECT MIN(SALARY) FROM EMPLOYEE WHERE (SELECT SALARY >= 10000 + )- This is syntactically incorrect.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.