12. Summarizing Character Occurrences B

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.
 

An additional, more advanced exercise of summarizing character occurrences.
Given a certain string, for example “hello world”.

 

Write a query that displays the number of times each letter appears in the string.
For example, the following result is achieved for “hello world”:

 

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…