Description

Write a SQL query to select all columns from the employees table. Return results ordered by id ascending. **Output columns (in order):** id, name, salary, department

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, 'Alice', 50000, 'Engineering'), (2, 'Bob', 60000, 'Marketing');
Output:1|Alice|50000|Engineering 2|Bob|60000|Marketing
Explanation:

The query returns all columns (id, name, salary, department) for all employees. Alice (id=1) from Engineering with salary 50000 appears first, followed by Bob (id=2) from Marketing with salary 60000. Results are ordered by id in ascending order.

Input:CREATE TABLE employees (id INT, name TEXT, salary INT, department TEXT); INSERT INTO employees VALUES (5, 'Diana', 75000, 'Sales'), (1, 'John', 45000, 'HR'), (3, 'Sarah', 68000, 'Finance');
Output:1|John|45000|HR 3|Sarah|68000|Finance 5|Diana|75000|Sales
Explanation:

Select all columns from employees table. Note that even though data was inserted with ids 5, 1, 3, the results are ordered by id ascending (1, 3, 5) as required by the problem.

Input:CREATE TABLE employees (id INT, name TEXT, salary INT, department TEXT); INSERT INTO employees VALUES (10, 'Michael', 90000, 'Technology');
Output:10|Michael|90000|Technology
Explanation:

With only one employee Michael (id=10) in the Technology department earning 90000, the query returns this single row. This demonstrates the query works correctly even with just one row of data.

Constraints

  • Write a SELECT statement

Ready to solve this problem?

Practice solo or challenge other developers in a real-time coding battle!