Names Starting With A

EasySQLDatabaseSorting

Description

Write a SQL query to return the names of users whose name starts with the letter 'A', ordered alphabetically. **Output columns (in order):** name

Table:users
ColumnType
idINT
nameTEXT

Examples

Input:CREATE TABLE users (id INT, name TEXT); INSERT INTO users VALUES (1,'Alice'),(2,'Bob'),(3,'Aaron');
Output:Aaron Alice
Explanation:

The pattern match keeps only names beginning with an uppercase A, sorted alphabetically.

Input:CREATE TABLE users (id INT, name TEXT); INSERT INTO users VALUES (1,'Zed'),(2,'Amy');
Output:Amy
Explanation:

The pattern match keeps only names beginning with an uppercase A, sorted alphabetically.

Input:CREATE TABLE users (id INT, name TEXT); INSERT INTO users VALUES (1,'Ada'),(2,'Ann'),(3,'Abe');
Output:Abe Ada Ann
Explanation:

The pattern match keeps only names beginning with an uppercase A, sorted alphabetically.

Constraints

  • Use standard SQL (SQLite).

Ready to solve this problem?

Practice solo and sharpen your skills for technical interviews.