SELECT Statements SQL Topic exerciseEasyVerified answerSQLite + PostgreSQL + MySQL + SQL Server live · 1 guided

SELECT with String Functions

Return employee first and last names in uppercase format.

  • String functions

Exercise brief

Understand the request

Data cleanup analyst A directory export needs employee names standardized in uppercase.

Return two columns — first_name_upper and last_name_upper — that are the uppercase versions of first_name and last_name for every employee.

Return

  • Return first_name_upper and last_name_upper.

Constraints

  • Use string functions to uppercase both name fields.

Data you will use

Review the relevant tables before deciding how to join, filter, or aggregate them.

employees

  • first_nameVARCHAR(50)
  • last_nameVARCHAR(50)

Hints, when you need them

Open one clue at a time so you still do the reasoning.

Hint 1

UPPER(<text>) returns the uppercase form of a text value. LOWER() does the opposite.

Hint 2

Wrap each column in UPPER() and give it its own alias so the result has two distinct columns.

Hint 3

Apply UPPER to each name independently and give each expression the requested output label.

Verified SQL answer

Attempt the problem first, then compare structure and reasoning—not just syntax.

Reveal solution and explanation
SELECT UPPER(first_name) AS first_name_upper, UPPER(last_name) AS last_name_upper FROM employees;

Why this works

Built-in functions like UPPER(), LOWER(), and LENGTH() can be called inside SELECT. Each call produces one new column, so to get two uppercase columns you need to call UPPER() twice — once per source column.

Expected result

Use this output to verify values, aliases, ordering, and row count.

first_name_upperlast_name_upper
JOHNSMITH
ALICEJOHNSON
BOBWILSON
CAROLDAVIS
DAVIDBROWN
EMMATAYLOR
FRANKGREEN
GRACEWHITE
HENRYCLARK
IVYMARTINEZ

Learn the concepts behind this answer

Strengthen your understanding with these targeted learning topics:

Continue practicing

SQL Practice Online

Open the interactive workspace and practice across SQL topics.