This advanced SQL exercise is part of the book: Advanced SQL – Practical Techniques and Use-Cases, which includes 100 day-to-day SQL challenges (and solutions), need-to-know advanced features, and key concepts.
 

Given a table that contains the full names of various users (first name, middle name, and last name).
There are cases where users don’t have a middle name – in these cases, the table contains only the first and last name of such users. There are also cases where users don’t have a middle name and/or last name – in these cases, the table contains only the first name of such users.


CREATE TABLE users
(userID int identity(1,1),
username varchar(25))
GO

Would you like to read more?