Uppercase Names

EasySQLDatabaseSorting

Description

Write a SQL query to return each user id and their name converted to uppercase, ordered by id ascending. **Output columns (in order):** id, name

Table:users
ColumnType
idINT
nameTEXT

Examples

Input:CREATE TABLE users (id INT, name TEXT); INSERT INTO users VALUES (1,'alice'),(2,'Bob'),(3,'cara');
Output:1|ALICE 2|BOB 3|CARA
Explanation:

Each name is converted to uppercase letters while keeping the rows ordered by id.

Input:CREATE TABLE users (id INT, name TEXT); INSERT INTO users VALUES (1,'x');
Output:1|X
Explanation:

Each name is converted to uppercase letters while keeping the rows ordered by id.

Input:CREATE TABLE users (id INT, name TEXT); INSERT INTO users VALUES (2,'mix'),(1,'CASE');
Output:1|CASE 2|MIX
Explanation:

Each name is converted to uppercase letters while keeping the rows ordered by id.

Constraints

  • Use standard SQL (SQLite).

Ready to solve this problem?

Practice solo and sharpen your skills for technical interviews.