Engineering High Earners

EasySQLDatabaseSorting

Description

Write a SQL query to return the name of every employee in the 'Eng' department earning more than 50000, ordered by name ascending. **Output columns (in order):** name

Table:employees
ColumnType
idINT
nameTEXT
salaryINT
departmentTEXT

Examples

Input:CREATE TABLE employees (id INT, name TEXT, salary INT, department TEXT); INSERT INTO employees VALUES (1,'Ann',60000,'Eng'),(2,'Ben',40000,'Eng'),(3,'Cal',70000,'Sales');
Output:Ann
Explanation:

Only engineers paid above the fifty-thousand mark are kept, returned in name order.

Input:CREATE TABLE employees (id INT, name TEXT, salary INT, department TEXT); INSERT INTO employees VALUES (1,'Zoe',90000,'Eng'),(2,'Amy',55000,'Eng');
Output:Amy Zoe
Explanation:

Only engineers paid above the fifty-thousand mark are kept, returned in name order.

Input:CREATE TABLE employees (id INT, name TEXT, salary INT, department TEXT); INSERT INTO employees VALUES (1,'P',99999,'HR'),(2,'Q',60000,'Eng');
Output:Q
Explanation:

Only engineers paid above the fifty-thousand mark are kept, returned in name order.

Constraints

  • Use standard SQL (SQLite).

Ready to solve this problem?

Practice solo and sharpen your skills for technical interviews.