Skip to content
C

Remove Low-Salary Employees

Mediumsql

Write a DELETE statement that removes every employee earning less than 60000. The checker runs SELECT id, name FROM employees ORDER BY id; afterward to see who remains.

sql
CREATE TABLE employees ( id INTEGER PRIMARY KEY, name TEXT NOT NULL, department TEXT NOT NULL, salary INTEGER NOT NULL );

Sample data (this is the starting state before your statement runs):

sql
INSERT INTO employees (id, name, department, salary) VALUES (1, 'Asha', 'Engineering', 85000), (2, 'Rohan', 'Sales', 55000), (3, 'Neha', 'Marketing', 58000), (4, 'Vikram', 'Engineering', 72000);

Input (stdin)

Output

Run your code to see output here...