35. Splitting a Row into Multiple Fields

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.

In this exercise you perform the opposite operation of the previous task. This exercise begins at a point where each row specifies the name of the city (in one field) and the various customers who live in that city (in the second field).

(CustomerCity varchar(25),
CustomerName varchar(250))

To read more

UpScale Analytics is one of the largest platforms in the world for learning SQL by doing, consisting over 300 SQL exercises at different levels (including solutions), by topics, across over 100 different datasets. More…