CodeBlanks Logo Icon CodeBlanks

Summary - String functions

Combine UPPER, SUBSTRING and CONCAT to format names.

Summary - String functions

In this group you learned UPPER, LOWER, LENGTH, SUBSTRING, TRIM and CONCAT. Combine them to produce clean reports.

SELECT UPPER(TRIM(name)) AS temiz_up FROM customers;

This query trims the name first then converts to uppercase.

UPPER(TRIM(name)) AS temiz_up is selected from customers.

Practice Summary - String functions

Trim and uppercase name from customers.

Starter code

query.sql
-- trim and uppercase
SELECT
FROM customers

Sample solution

query.sql
SELECT UPPER(TRIM(name)) AS temiz_up
FROM customers

Expected output

temiz_up
AYŞE
ALEX

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which runs first in nested functions?

  • At the same time
  • The outer one
  • Random
  • The inner one Correct answer

Explanation: The inner function runs first.

2 Summary - String functions: match the terms

Term Meaning
UPPER uppercase
LOWER lowercase
LENGTH length
CONCAT join

All lessons in Beginner