Olawale Ahmed Alamu
1 min readNov 6, 2022

SQL Daily Practice — Day 3

Hello, Connections, Data Analyst and BI Enthusiasts.

It's day 3 of our SQL daily practice on SQL-practice-dot-com

Follow Olawale Ahmed Alamu for the previous days and daily updates.

Today's question is the third question on SQL-PRACTICE-DOT-COM. Let's go!

QUESTION: Show first name of patients that start with the letter 'C'.

PROBLEM ANALYSIS: We are to output the first name of patients whose first name starts with the letter 'C' i.e. names like Claudia, Caesar etc.

The patients' table has the following columns:

patient_id INT
first_name TEXT
last_name TEXT
gender CHAR(1)
birth_date DATE
city TEXT
province_id CHAR(2)
allergies TEXT
height INT
weight INT

SOLUTION: We write a SELECT statement to generate first names of patients with a WHERE clause to restrict the selection to first names starting with the letter 'C'. In this case, we use the wild card 'C%' with the LIKE keyword.

SQL SCRIPT:
-- -- -- -- -- --
SELECT first_name
FROM patients
WHERE first_name LIKE 'C%’;
-- -- -- -- -- --

Link for SQL-practice-dot-com in the comments section.

#sql #databases #dataanalytics

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Olawale Ahmed Alamu
Olawale Ahmed Alamu

Written by Olawale Ahmed Alamu

CS Grad | Power BI | Microsoft Excel | Learning and Teaching SQL Daily

No responses yet

Write a response