Back to questions

SQL LIKE % Practice Exercise SQL Interview Question

SQL LIKE % Practice Exercise

SQL Interview Question

You have a table of 1000 customer records from a small-business based in Australia.

Find all customers whose first name starts with "F" and the last letter in their last name is "ck".

Schema:

Column NameType
customer_idinteger
customer_namestring
genderstring
ageinteger
zip_codeinteger
citystring
statestring

Sample Input:

customer_idcustomer_namegenderagezip_codecitystate
1Ignace WhillockMale305464JohnstonhavenNorthern Territory
2Gray EskrickFemale698223New ZacharyfortSouth Australia
3Ellswerth LaurentMale595661AliburghAustralian Capital Territory
.......................

Example Output

customer_idcustomer_namegenderagezip_codecitystate
155Farrah RenwickFemale807841Port SophiaNew South Wales
360Francene ShurlockFemale685743KingmouthNorthern Territory
622Felic RoderickMale352110Lake VictoriasideVictoria

Difficulty

Easy

Input

Output